Skip to content

Commit

Permalink
#212 Update main dining title
Browse files Browse the repository at this point in the history
  • Loading branch information
wateralsie committed Apr 8, 2024
1 parent 5924e50 commit b2f6dc9
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class MainActivity : KoinNavigationDrawerActivity() {
}

observeLiveData(selectedType) {
binding.textViewCardDiningTime.text = it.localized(this@MainActivity)
binding.textViewDiningTime.text = it.localized(this@MainActivity)
}

observeLiveData(busTimer) {
Expand Down
118 changes: 84 additions & 34 deletions koin/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:ignore="MissingPrefix">

<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<com.google.android.material.card.MaterialCardView
android:id="@+id/toolbar"
style="@style/AppTheme.Toolbar.Main"
Expand All @@ -24,14 +27,17 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<FrameLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_main_height">

<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
Expand All @@ -41,6 +47,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/button_category"
android:layout_width="24dp"
Expand All @@ -54,20 +61,24 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
</com.google.android.material.card.MaterialCardView>

<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/main_swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="-24dp">

<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:orientation="vertical">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -77,16 +88,18 @@
android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold" />

<androidx.viewpager2.widget.ViewPager2
android:id="@+id/bus_view_pager"
android:layout_width="match_parent"
android:layout_height="151dp"
android:layout_marginTop="4dp"
android:clipToPadding="false"
tools:paddingStart="40dp"
tools:paddingTop="8dp"
tools:paddingBottom="8dp"
tools:paddingEnd="40dp"
tools:paddingBottom="8dp" />
tools:paddingStart="40dp"
tools:paddingTop="8dp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -96,6 +109,7 @@
android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_store_category"
android:layout_width="match_parent"
Expand All @@ -104,24 +118,59 @@
android:paddingStart="10dp"
android:paddingTop="11dp"
android:paddingEnd="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="32dp"
android:text="식단"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
android:id="@+id/text_view_dining_tomorrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="32dp"
android:text="내일"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />

<TextView
android:id="@+id/text_view_dining_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/text_view_dining_tomorrow"
app:layout_constraintTop_toTopOf="@id/text_view_dining_tomorrow"
tools:text="아침" />

<TextView
android:id="@+id/text_view_dining_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="식단"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/text_view_dining_time"
app:layout_constraintTop_toTopOf="@id/text_view_dining_time" />


</androidx.constraintlayout.widget.ConstraintLayout>

<com.google.android.material.card.MaterialCardView
android:id="@+id/dining_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:elevation="@dimen/normal_card_elevation"
app:cardCornerRadius="0dp"
android:layout_margin="16dp">
app:cardCornerRadius="0dp">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -171,9 +220,9 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="메뉴1"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="메뉴1" />

<TextView
android:id="@+id/text_view_card_dining_menu_1"
Expand All @@ -183,9 +232,9 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="메뉴2"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="메뉴2" />

</TableRow>

Expand All @@ -199,9 +248,9 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="메뉴3"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="메뉴3" />

<TextView
android:id="@+id/text_view_card_dining_menu_3"
Expand All @@ -211,9 +260,9 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="메뉴4"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="메뉴4" />

</TableRow>

Expand All @@ -227,9 +276,9 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="메뉴5"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="메뉴5" />

<TextView
android:id="@+id/text_view_card_dining_menu_5"
Expand All @@ -239,9 +288,9 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="메뉴6"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="메뉴6" />

</TableRow>

Expand All @@ -255,9 +304,9 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="메뉴7"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="메뉴7" />

<TextView
android:id="@+id/text_view_card_dining_menu_7"
Expand All @@ -267,9 +316,9 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="메뉴8"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="메뉴8" />

</TableRow>

Expand All @@ -286,9 +335,9 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="메뉴9"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="메뉴9" />

<TextView
android:id="@+id/text_view_card_dining_menu_9"
Expand All @@ -298,9 +347,9 @@
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="까르보나라민트초코파맛첵스파게티"
android:textColor="@color/black"
android:textSize="12sp" />
android:textSize="12sp"
tools:text="까르보나라민트초코파맛첵스파게티" />

</TableRow>

Expand All @@ -325,6 +374,7 @@
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

<include layout="@layout/base_navigation_drawer_right" />
</androidx.drawerlayout.widget.DrawerLayout>
</layout>
4 changes: 2 additions & 2 deletions koin/src/main/res/layout/main_card_dining.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
android:paddingStart="16dp"
android:paddingEnd="48dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/text_view_card_dining_time"
app:layout_constraintEnd_toStartOf="@id/text_view_dining_time"
app:layout_constraintTop_toTopOf="parent" >

<LinearLayout
Expand Down Expand Up @@ -111,7 +111,7 @@
</HorizontalScrollView>

<TextView
android:id="@+id/text_view_card_dining_time"
android:id="@+id/text_view_dining_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
Expand Down

0 comments on commit b2f6dc9

Please sign in to comment.