Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/#495 태블릿 화면대응 #504

Open
wants to merge 17 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class LineChartManager(
mAxisMaximum = 6f // 6개월
mAxisMinimum = 1f
granularity = 1f // x축 간격
textSize = 8f
textSize = lineChart.resources.getDimension(R.dimen.my_page_graph_axis_text_size)
typeface = fontStyle
valueFormatter = object : IndexAxisValueFormatter() {
override fun getFormattedValue(value: Float): String {
Expand All @@ -76,6 +76,7 @@ class LineChartManager(
lineChart.axisLeft.apply {
this.textColor = textColor
typeface = fontStyle
textSize = lineChart.resources.getDimension(R.dimen.my_page_graph_axis_text_size)
valueFormatter = object : IndexAxisValueFormatter() {
override fun getFormattedValue(value: Float): String {
return (value / UNIT_MONEY + 0.1).toInt().toString()
Expand All @@ -94,11 +95,14 @@ class LineChartManager(
lineChart.legend.apply {
this.textColor = textColor
typeface = fontStyle
xEntrySpace = 20f // 라벨 간 간격 (가로)
textSize = lineChart.resources.getDimension(R.dimen.my_page_graph_legend_text_size)
xEntrySpace =
lineChart.resources.getDimension(R.dimen.my_page_graph_legend_entry_size) // 라벨 간 간격 (가로)
verticalAlignment = Legend.LegendVerticalAlignment.BOTTOM
horizontalAlignment = Legend.LegendHorizontalAlignment.RIGHT
orientation = Legend.LegendOrientation.HORIZONTAL
xOffset = 10f
xOffset = lineChart.resources.getDimension(R.dimen.my_page_graph_legend_offset_size)
yOffset = 20f
}
}

Expand Down
72 changes: 72 additions & 0 deletions android/app/src/main/res/layout-sw600dp/view_post_reaction.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="240dp"
android:layout_height="24dp">

<ImageView
android:id="@+id/iv_view_count"
android:layout_width="0dp"
android:layout_height="0dp"
android:src="@drawable/ic_view_count"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_percent="0.12" />

<TextView
android:id="@+id/tv_view_count"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:gravity="center_vertical"
android:textColor="@color/gray_615f5f"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_view_count"
app:layout_constraintTop_toTopOf="parent"
tools:text="123" />

<Space
android:id="@+id/space_view_count_right"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="W, 8:16"
app:layout_constraintStart_toEndOf="@id/tv_view_count"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/iv_comment_count"
android:layout_width="0dp"
android:layout_height="0dp"
android:src="@drawable/ic_comment_count"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/space_view_count_right"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_percent="0.12" />

<TextView
android:id="@+id/tv_comment_count"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:gravity="center_vertical"
android:textColor="@color/gray_615f5f"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_comment_count"
app:layout_constraintTop_toTopOf="parent"
tools:text="37" />

<Space
android:id="@+id/space_comment_count_right"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="W, 8:16"
app:layout_constraintStart_toEndOf="@id/tv_comment_count"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
17 changes: 7 additions & 10 deletions android/app/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@

<TextView
android:id="@+id/tv_email"
style="@style/BASIC_TEXT_STYLE"
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/login_email"
android:textColor="@color/black_000000"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@id/space_email_left"
app:layout_constraintDimensionRatio="W,90:32"
app:layout_constraintStart_toEndOf="@id/space_email_left"
app:layout_constraintTop_toBottomOf="@id/space_logo_bottom" />

<EditText
android:id="@+id/et_email"
style="@style/BASIC_TEXT_STYLE"
android:layout_width="0dp"
android:layout_height="0dp"
android:autofillHints="emailAddress"
Expand All @@ -84,7 +84,6 @@
android:maxLines="1"
android:padding="10dp"
android:textColor="@color/black_000000"
android:textSize="16sp"
app:layout_constraintDimensionRatio="H,270:36"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -111,19 +110,19 @@

<TextView
android:id="@+id/tv_password"
style="@style/BASIC_TEXT_STYLE"
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/login_password"
android:textColor="@color/black_000000"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@id/space_password_left"
app:layout_constraintDimensionRatio="W,90:28"
app:layout_constraintStart_toEndOf="@id/space_password_left"
app:layout_constraintTop_toBottomOf="@id/space_password_top" />

<EditText
android:id="@+id/et_password"
style="@style/BASIC_TEXT_STYLE"
android:layout_width="0dp"
android:layout_height="0dp"
android:autofillHints="password"
Expand All @@ -132,7 +131,6 @@
android:padding="10dp"
android:textColor="@color/black_000000"
android:textColorHint="@color/black_000000"
android:textSize="16sp"
app:layout_constraintDimensionRatio="H,270:36"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -150,14 +148,14 @@

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/bt_login"
style="@style/BUTTON_TEXT_STYLE"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/bg_576b9e_radius_6dp"
android:onClick="@{() -> viewModel.onLoginClick(etEmail.getText().toString(), etPassword.getText().toString())}"
android:stateListAnimator="@null"
android:text="@string/login_login"
android:textColor="@color/white_ffffff"
android:textSize="16sp"
app:layout_constraintDimensionRatio="H,320:48"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down Expand Up @@ -207,12 +205,11 @@

<TextView
android:id="@+id/tv_join"
style="@style/BASIC_TEXT_STYLE"
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_vertical"
android:text="@string/login_suggest"
android:textColor="@color/black_000000"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="@id/space_join_left"
app:layout_constraintDimensionRatio="W,104:28"
app:layout_constraintStart_toEndOf="@id/space_join_left"
Expand All @@ -221,13 +218,13 @@

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/bt_join"
style="@style/BUTTON_TEXT_STYLE"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/bg_576b9e_radius_6dp"
android:stateListAnimator="@null"
android:text="@string/login_join"
android:textColor="@color/white_ffffff"
android:textSize="16sp"
app:layout_constraintDimensionRatio="H,320:48"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/blue_576b9e"
app:itemIconSize="36dp"
app:itemIconSize="@dimen/main_bottom_icon_size"
app:itemIconTint="@drawable/selector_bottom_nav_icon_tint"
app:labelVisibilityMode="unlabeled"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="H,360:56"
app:layout_constraintHeight_percent="0.08"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/bottom_menu" />
Expand Down
14 changes: 7 additions & 7 deletions android/app/src/main/res/layout/activity_post_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tb_post_detail">


<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_post_all_detail"
android:layout_width="match_parent"
Expand Down Expand Up @@ -121,11 +120,10 @@

<TextView
android:id="@+id/tv_title"
style="@style/BASIC_TITLE_TEXT_STYLE"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="@{postViewModel.post.title}"
android:textColor="@color/black_434343"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/space_content_start"
app:layout_constraintTop_toBottomOf="@id/space_image_bottom"
Expand Down Expand Up @@ -153,23 +151,23 @@

<TextView
android:id="@+id/tv_user_nickname"
style="@style/BASIC_TEXT_STYLE"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:text="@{postViewModel.post.writer.nickname.toString()}"
android:textColor="@color/black_434343"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@id/iv_user_profile"
app:layout_constraintTop_toTopOf="@id/iv_user_profile"
tools:text="하티" />

<TextView
android:id="@+id/tv_post_time"
style="@style/BASIC_TEXT_EXPLANATION"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:text="@{postViewModel.post.createdAt.toString()}"
android:textSize="12sp"
app:layout_constraintStart_toEndOf="@id/iv_user_profile"
app:layout_constraintTop_toBottomOf="@id/tv_user_nickname"
tools:text="1시간 전" />
Expand All @@ -185,10 +183,10 @@

<TextView
android:id="@+id/tv_price"
style="@style/BASIC_TEXT_STYLE"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{@string/all_price_long(postViewModel.post.price)}"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/space_content_start"
app:layout_constraintTop_toBottomOf="@id/space_price_top"
Expand All @@ -206,11 +204,11 @@

<TextView
android:id="@+id/tv_content"
style="@style/BASIC_TEXT_STYLE"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{postViewModel.post.content}"
android:textColor="@color/black_434343"
android:textSize="14sp"
app:layout_constraintEnd_toStartOf="@id/space_content_end"
app:layout_constraintStart_toEndOf="@id/space_content_start"
app:layout_constraintTop_toBottomOf="@id/space_price_bottom"
Expand Down Expand Up @@ -322,6 +320,7 @@

<TextView
android:id="@+id/tv_up_count"
style="@style/BASIC_TEXT_EXPLANATION"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="@{Integer.toString(postViewModel.recommendation.upCount)}"
Expand All @@ -332,6 +331,7 @@

<TextView
android:id="@+id/tv_down_count"
style="@style/BASIC_TEXT_EXPLANATION"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="@{Integer.toString(postViewModel.recommendation.downCount)}"
Expand Down
21 changes: 11 additions & 10 deletions android/app/src/main/res/layout/activity_post_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:layout_gravity="center_vertical|center_horizontal"
android:text="@string/post_editor_page_title"
android:textColor="@color/white_ffffff"
android:textSize="20sp" />
android:textSize="@dimen/post_editor_title_text_size" />
</androidx.appcompat.widget.Toolbar>

<Space
Expand All @@ -48,19 +48,19 @@
android:id="@+id/tv_post_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginStart="@dimen/post_editor_margin"
android:text="@string/post_editor_post_title"
android:textColor="@color/gray_7c7a7a"
android:textSize="16sp"
style="@style/BASIC_TEXT_STYLE"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/space_title_top" />

<EditText
android:id="@+id/et_post_title"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="84dp"
android:layout_marginEnd="20dp"
android:layout_marginStart="@dimen/post_editor_margin_between_title_and_edit"
android:layout_marginEnd="@dimen/post_editor_margin"
android:autofillHints="no"
android:background="@android:color/transparent"
android:gravity="center_vertical"
Expand All @@ -70,7 +70,7 @@
android:text="@{viewModel.postEditor.title}"
android:textColor="@color/gray_434343"
android:textColorHint="@color/gray_615f5f"
android:textSize="14sp"
style="@style/EDIT_TEXT_STYLE"
app:layout_constraintBaseline_toBaselineOf="@+id/tv_post_title"
app:layout_constraintDimensionRatio="254:14"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -83,7 +83,7 @@
android:layout_marginTop="16dp"
android:text="@string/all_price_title"
android:textColor="@color/gray_7c7a7a"
android:textSize="16sp"
style="@style/BASIC_TEXT_STYLE"
app:layout_constraintStart_toStartOf="@id/tv_post_title"
app:layout_constraintTop_toBottomOf="@id/tv_post_title" />

Expand All @@ -99,7 +99,7 @@
android:textAlignment="textEnd"
android:textColor="@color/gray_434343"
android:textColorHint="@color/gray_615f5f"
android:textSize="14sp"
style="@style/EDIT_TEXT_STYLE"
app:layout_constraintBaseline_toBaselineOf="@+id/tv_post_price"
app:layout_constraintStart_toStartOf="@+id/et_post_title" />

Expand All @@ -109,7 +109,7 @@
android:layout_marginStart="2dp"
android:text="@string/all_price_unit"
android:textColor="@color/black_000000"
android:textSize="14sp"
style="@style/EDIT_TEXT_STYLE"
android:textStyle="bold"
app:layout_constraintBaseline_toBaselineOf="@+id/et_post_price"
app:layout_constraintStart_toEndOf="@+id/et_post_price" />
Expand Down Expand Up @@ -140,6 +140,7 @@
android:layout_height="0dp"
app:layout_constraintDimensionRatio="H,360:20"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/div_post_editor_title_provider" />

Expand Down Expand Up @@ -171,7 +172,7 @@
android:text="@{viewModel.postEditor.content}"
android:textColor="@color/gray_434343"
android:textColorHint="@color/gray_615f5f"
android:textSize="18sp"
android:textSize="@dimen/post_editor_comment_text_size"
app:layout_constraintTop_toTopOf="@id/cl_post_content_images" />

<Space
Expand Down
Loading
Loading