147 lines
6.9 KiB
XML
147 lines
6.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:fitsSystemWindows="true"
|
|
android:background="?android:attr/colorPrimary"
|
|
tools:context=".ui.activities.MainActivity">
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:cardElevation="2dp"
|
|
app:cardCornerRadius="0dp"
|
|
android:id="@+id/toolbar"
|
|
android:transitionName="@string/toolbar_transition_name"
|
|
app:cardBackgroundColor="@color/colorPrimary">
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="56dp"
|
|
android:gravity="center_vertical"
|
|
android:paddingLeft="8dp"
|
|
android:paddingRight="8dp">
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:src="@drawable/ic_splash_logo"
|
|
android:layout_alignParentBottom="true"
|
|
android:layout_marginBottom="3dp"
|
|
android:visibility="gone"
|
|
android:layout_alignParentLeft="true"
|
|
android:id="@+id/logo"/>
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_centerInParent="true">
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:text="@string/app_name"
|
|
android:gravity="center"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="1dp"
|
|
style="@style/AnotherWidget.Main.Title"/>
|
|
</LinearLayout>
|
|
<ImageView
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:padding="8dp"
|
|
android:src="@drawable/round_short_text"
|
|
android:scaleX="-1"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:tint="@color/colorPrimaryText"
|
|
android:layout_centerVertical="true"
|
|
android:layout_alignParentRight="true"
|
|
android:id="@+id/action_settings"/>
|
|
</RelativeLayout>
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="140dp"
|
|
android:id="@+id/preview"
|
|
android:animateLayoutChanges="true"
|
|
app:cardBackgroundColor="@color/colorPrimary"
|
|
android:layout_marginRight="16dp"
|
|
android:layout_marginLeft="16dp"
|
|
app:cardCornerRadius="9dp"
|
|
app:cardElevation="0dp">
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:scaleType="fitStart"
|
|
android:adjustViewBounds="true"
|
|
android:id="@+id/widget_bg" />
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerInParent="true"
|
|
android:layout_gravity="center"
|
|
android:orientation="vertical"
|
|
android:id="@+id/widget"
|
|
android:alpha="0"
|
|
android:gravity="center">
|
|
<include layout="@layout/the_widget_sans" />
|
|
</LinearLayout>
|
|
<ProgressBar
|
|
android:layout_width="32dp"
|
|
android:layout_height="32dp"
|
|
android:layout_centerInParent="true"
|
|
android:indeterminate="true"
|
|
android:indeterminateTint="@android:color/white"
|
|
android:id="@+id/widget_loader" />
|
|
</RelativeLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<com.google.android.material.tabs.TabLayout
|
|
android:id="@+id/tabs"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="56dp"
|
|
app:tabGravity="start"
|
|
app:tabIndicatorColor="@color/colorAccent"
|
|
app:tabBackground="@color/colorPrimary"
|
|
app:tabIndicatorFullWidth="false"
|
|
app:tabMode="scrollable"
|
|
app:tabIndicatorHeight="3dp"
|
|
app:tabUnboundedRipple="true"
|
|
app:tabRippleColor="@color/colorPrimary"
|
|
app:tabTextColor="@color/colorSecondaryText"
|
|
app:tabSelectedTextColor="@color/colorAccent"
|
|
app:tabIndicator="@drawable/custom_tab_indicator"
|
|
app:tabPadding="16dp"
|
|
android:paddingLeft="16dp"
|
|
android:paddingRight="16dp"
|
|
android:clipToPadding="false"
|
|
app:tabMinWidth="110dp"
|
|
app:tabMaxWidth="0dp"
|
|
android:background="@color/colorPrimary"
|
|
app:tabTextAppearance="@style/AnotherWidget.Settings.Header" />
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView>
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
app:layout_constraintTop_toBottomOf="@+id/toolbar"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
android:background="@color/colorPrimaryDark"
|
|
android:orientation="vertical">
|
|
<androidx.viewpager2.widget.ViewPager2
|
|
android:id="@+id/pager"
|
|
android:layout_width="match_parent"
|
|
android:elevation="0dp"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1" />
|
|
|
|
</LinearLayout>
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |