mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-08-12 18:22:22 +00:00
fix home fragment layout
This commit is contained in:
@ -5,20 +5,28 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.MainActivity">
|
tools:context=".ui.MainActivity">
|
||||||
|
|
||||||
<!-- NavHostFragment -->
|
<!-- NavHostFragment -->
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/nav_host_fragment"
|
android:id="@+id/nav_host_fragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
|
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
|
||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
app:defaultNavHost="true"
|
app:defaultNavHost="true"
|
||||||
app:navGraph="@navigation/nav_graph" />
|
app:navGraph="@navigation/nav_graph" />
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:id="@+id/divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:dividerColor="@color/gray_1"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/bottom_navigation" />
|
||||||
<!-- BottomNavigationView -->
|
<!-- BottomNavigationView -->
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
android:id="@+id/bottom_navigation"
|
android:id="@+id/bottom_navigation"
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/home"
|
android:id="@+id/home"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -85,15 +84,41 @@
|
|||||||
tools:layout_editor_absoluteX="0dp"
|
tools:layout_editor_absoluteX="0dp"
|
||||||
tools:listitem="@layout/item_category_home" />
|
tools:listitem="@layout/item_category_home" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/new_products_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="@string/new_products_text"
|
||||||
|
android:textColor="@color/dark"
|
||||||
|
android:textSize="22sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/categories" />
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/productshowAll"
|
||||||
|
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:text="@string/show_all"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="@color/blue1"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintBaseline_toBaselineOf="@id/new_products_text"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/new_products"
|
android:id="@+id/new_products"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="39dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="32dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
app:layout_constraintTop_toBottomOf="@id/categories"
|
app:layout_constraintTop_toBottomOf="@id/new_products_text"
|
||||||
tools:itemCount="5"
|
tools:itemCount="5"
|
||||||
tools:listitem="@layout/item_section_horizontal" />
|
tools:listitem="@layout/item_section_horizontal" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -11,4 +11,5 @@
|
|||||||
<string name="item_price_txt">Rp%.1f</string>
|
<string name="item_price_txt">Rp%.1f</string>
|
||||||
<string name="retry">Coba lagi\n</string>
|
<string name="retry">Coba lagi\n</string>
|
||||||
<string name="error_loading">Terdapat error...</string>
|
<string name="error_loading">Terdapat error...</string>
|
||||||
|
<string name="new_products_text">Produk Terbaru</string>
|
||||||
</resources>
|
</resources>
|
Reference in New Issue
Block a user