Completed switching between fragments on home with theme switching and language switching Language switch live data Home fragment background switching w.r.t. to time. Icon settings on home fragment
585 lines
22 KiB
XML
585 lines
22 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@+id/home_drawer"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
|
|
tools:openDrawer="end"
|
|
tools:context=".home.HomeActivity">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/main"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:id="@+id/side_menu"
|
|
android:layout_width="@dimen/_40sdp"
|
|
android:layout_height="@dimen/_40sdp"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
app:cardCornerRadius="@dimen/_20sdp"
|
|
app:cardElevation="3dp"
|
|
|
|
android:layout_margin="20dp"
|
|
|
|
>
|
|
|
|
<ImageView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
|
|
android:contentDescription="@string/image"
|
|
|
|
android:src="@drawable/ic_menu"
|
|
/>
|
|
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<androidx.fragment.app.FragmentContainerView
|
|
android:id="@+id/fc_home"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
|
|
app:layout_constraintBottom_toTopOf="@id/bottom_nav"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
/>
|
|
|
|
<com.woka.home.BottomNavigation
|
|
android:id="@+id/bottom_nav"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
/>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<com.google.android.material.navigation.NavigationView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="end"
|
|
android:background="@color/color_primary"
|
|
>
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:overScrollMode="never"
|
|
android:layout_marginTop="45dp"
|
|
android:scrollbars="none"
|
|
>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="15dp"
|
|
android:layout_marginBottom="15dp"
|
|
android:orientation="vertical">
|
|
|
|
<ImageView
|
|
android:id="@+id/close_drawer"
|
|
android:layout_width="20dp"
|
|
android:layout_height="20dp"
|
|
android:contentDescription="@string/image"
|
|
android:src="@drawable/ic_close"
|
|
android:layout_gravity="end"
|
|
/>
|
|
|
|
<ImageView
|
|
android:id="@+id/sb_user_image"
|
|
android:layout_width="@dimen/_40sdp"
|
|
android:layout_height="@dimen/_40sdp"
|
|
android:contentDescription="@string/image"
|
|
android:scaleType="fitXY"
|
|
android:src="@drawable/profile_placeholder"
|
|
|
|
android:layout_gravity="center_horizontal"
|
|
|
|
android:layout_marginTop="15dp"
|
|
/>
|
|
|
|
<TextView
|
|
android:id="@+id/sb_user_name"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
|
|
tools:text="Aditya Gaikwad"
|
|
android:textColor="@color/white"
|
|
android:fontFamily="@font/exo_2_bold"
|
|
android:textSize="@dimen/_14ssp"
|
|
android:textAlignment="center"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:maxLines="1"
|
|
android:ellipsize="end"
|
|
|
|
android:layout_marginTop="10dp"
|
|
|
|
/>
|
|
|
|
<Button
|
|
android:id="@+id/sb_btn"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="40dp"
|
|
|
|
android:background="@drawable/grad_btn_bg_4"
|
|
|
|
tools:text="Logout"
|
|
android:textSize="@dimen/_11ssp"
|
|
android:textColor="@color/white"
|
|
android:fontFamily="@font/exo_2_bold"
|
|
|
|
android:layout_marginTop="15dp"
|
|
android:layout_marginHorizontal="15dp"
|
|
|
|
android:layout_gravity="center_horizontal"
|
|
|
|
/>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/theme"
|
|
android:fontFamily="@font/exo_2_bold"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_11ssp"
|
|
|
|
android:layout_gravity="center_horizontal"
|
|
|
|
android:layout_marginTop="25dp"
|
|
|
|
/>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="15dp"
|
|
android:orientation="horizontal"
|
|
style="@style/Theme.MaterialComponents"
|
|
android:gravity="center"
|
|
>
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:id="@+id/sb_theme_1"
|
|
android:layout_width="80dp"
|
|
android:layout_height="120dp"
|
|
app:cardCornerRadius="3dp"
|
|
|
|
android:layout_marginEnd="12dp"
|
|
>
|
|
|
|
<ImageView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:contentDescription="@string/image"
|
|
android:src="@drawable/theme_1"
|
|
/>
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/sb_theme_1_selected"
|
|
android:visibility="gone"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
>
|
|
|
|
<ImageView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:contentDescription="@string/image"
|
|
android:src="@drawable/theme_selected_tint"/>
|
|
|
|
<ImageView
|
|
android:layout_width="30dp"
|
|
android:layout_height="30dp"
|
|
android:layout_centerInParent="true"
|
|
android:contentDescription="@string/image"
|
|
android:src="@drawable/ic_green_tick"
|
|
/>
|
|
|
|
</RelativeLayout>
|
|
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:id="@+id/sb_theme_2"
|
|
android:layout_width="80dp"
|
|
android:layout_height="120dp"
|
|
app:strokeWidth="1dp"
|
|
app:strokeColor="@color/white"
|
|
app:cardCornerRadius="3dp"
|
|
|
|
android:layout_marginStart="12dp"
|
|
>
|
|
|
|
<ImageView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:contentDescription="@string/image"
|
|
android:src="@drawable/theme_2"
|
|
/>
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/sb_theme_2_selected"
|
|
android:visibility="gone"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
>
|
|
|
|
<ImageView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:contentDescription="@string/image"
|
|
android:src="@drawable/theme_selected_tint"/>
|
|
|
|
<ImageView
|
|
android:layout_width="30dp"
|
|
android:layout_height="30dp"
|
|
android:layout_centerInParent="true"
|
|
android:contentDescription="@string/image"
|
|
android:src="@drawable/ic_green_tick"
|
|
/>
|
|
|
|
</RelativeLayout>
|
|
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0.5dp"
|
|
android:background="@color/woka_sky_blue"
|
|
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginBottom="20dp"
|
|
/>
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal"
|
|
app:cardCornerRadius="30dp"
|
|
app:cardBackgroundColor="@color/color_primary_dark"
|
|
>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:weightSum="2"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/sb_english"
|
|
android:layout_width="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/english"
|
|
android:textAllCaps="true"
|
|
android:fontFamily="@font/exo_2_medium"
|
|
android:textColor="@color/white"
|
|
android:textAlignment="center"
|
|
android:textSize="@dimen/_11ssp"
|
|
|
|
android:background="@android:color/transparent"
|
|
|
|
android:paddingVertical="10dp"
|
|
|
|
/>
|
|
|
|
<TextView
|
|
android:id="@+id/sb_hindi"
|
|
android:layout_width="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/hindi"
|
|
android:textAllCaps="true"
|
|
android:fontFamily="@font/exo_2_medium"
|
|
android:textColor="@color/white"
|
|
android:textAlignment="center"
|
|
android:textSize="@dimen/_11ssp"
|
|
|
|
android:background="@android:color/transparent"
|
|
|
|
android:paddingVertical="10dp"
|
|
|
|
/>
|
|
|
|
</LinearLayout>
|
|
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0.5dp"
|
|
android:background="@color/woka_sky_blue"
|
|
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginBottom="10dp"
|
|
/>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/about_woka"
|
|
android:fontFamily="@font/exo_2_bold"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_14ssp"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
/>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/faqs"
|
|
android:fontFamily="@font/exo_2_bold"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_14ssp"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
/>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/woka_support"
|
|
android:fontFamily="@font/exo_2_bold"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_14ssp"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
/>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:visibility="gone"
|
|
|
|
android:text="@string/my_profile"
|
|
android:fontFamily="@font/exo_2_bold"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_14ssp"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
/>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:visibility="gone"
|
|
|
|
android:text="@string/my_orders"
|
|
android:fontFamily="@font/exo_2_bold"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_14ssp"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
/>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:visibility="gone"
|
|
|
|
android:text="@string/de_activate_account"
|
|
android:fontFamily="@font/exo_2_bold"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_14ssp"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
/>
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0.5dp"
|
|
android:background="@color/woka_sky_blue"
|
|
|
|
android:layout_marginTop="10dp"
|
|
android:layout_marginBottom="8dp"
|
|
/>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/terms_conditions"
|
|
android:fontFamily="@font/exo_2_medium"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_10ssp"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
/>
|
|
|
|
<View
|
|
android:layout_width="0.5dp"
|
|
android:layout_height="15dp"
|
|
android:background="@color/white"
|
|
|
|
android:layout_marginTop="1dp"
|
|
android:layout_marginHorizontal="2dp"
|
|
/>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/privacy_policy"
|
|
android:fontFamily="@font/exo_2_medium"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_10ssp"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
/>
|
|
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0.5dp"
|
|
|
|
android:background="@color/woka_sky_blue"
|
|
android:layout_marginVertical="8dp"
|
|
/>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/disclaimer"
|
|
android:fontFamily="@font/exo_2_medium"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_10ssp"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
|
|
android:foreground="?android:attr/selectableItemBackground"
|
|
/>
|
|
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0.5dp"
|
|
|
|
android:background="@color/woka_sky_blue"
|
|
android:layout_marginVertical="8dp"
|
|
/>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:weightSum="10"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_weight="7"
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/woka_creations_private_ltd"
|
|
android:fontFamily="@font/exo_2_medium"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_10ssp"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
/>
|
|
|
|
<TextView
|
|
android:id="@+id/sb_version"
|
|
android:layout_width="0dp"
|
|
android:layout_weight="3"
|
|
android:layout_height="wrap_content"
|
|
|
|
tools:text="VER 25.1.1"
|
|
android:fontFamily="@font/exo_2_medium"
|
|
android:textColor="@color/white"
|
|
android:textSize="@dimen/_10ssp"
|
|
android:textAlignment="viewEnd"
|
|
|
|
android:paddingVertical="5dp"
|
|
android:paddingHorizontal="5dp"
|
|
/>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
</com.google.android.material.navigation.NavigationView>
|
|
|
|
</androidx.drawerlayout.widget.DrawerLayout> |