mirror of
https://github.com/FatttSnake/OxygenToolbox.git
synced 2026-04-06 15:31:27 +08:00
Optimized code and resources.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<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:id="@+id/libraries_page"
|
||||
android:id="@+id/constraint_layout_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/app_background_theme"
|
||||
@@ -25,7 +25,7 @@
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/libraries_recycler_view"
|
||||
android:id="@+id/recycler_view_libraries"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
android:background="?attr/windowSplashScreenBackground">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="288dp"
|
||||
android:layout_height="288dp"
|
||||
android:id="@+id/image_view_logo"
|
||||
android:layout_width="@dimen/splash_logo_size"
|
||||
android:layout_height="@dimen/splash_logo_size"
|
||||
android:contentDescription="Logo"
|
||||
android:src="@drawable/ic_launcher"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<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:id="@+id/constraint_layout_time_screen"
|
||||
android:id="@+id/constraint_layout_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/app_show_background_theme"
|
||||
@@ -13,9 +13,9 @@
|
||||
android:id="@+id/image_view_mode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_margin="@dimen/tool_time_screen_image_view_mode_margin"
|
||||
android:contentDescription="Change Mode"
|
||||
android:padding="10dp"
|
||||
android:padding="@dimen/tool_time_screen_clickable_padding"
|
||||
android:src="@drawable/animation_light_to_dark_mode"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -32,14 +32,14 @@
|
||||
<TextSwitcher
|
||||
android:id="@+id/text_switcher_hour_ten"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||
android:inAnimation="@anim/text_from_top_in"
|
||||
android:outAnimation="@anim/text_to_down_out" />
|
||||
|
||||
<TextSwitcher
|
||||
android:id="@+id/text_switcher_hour_one"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||
android:gravity="center"
|
||||
android:inAnimation="@anim/text_from_top_in"
|
||||
android:outAnimation="@anim/text_to_down_out" />
|
||||
@@ -47,17 +47,17 @@
|
||||
<TextView
|
||||
android:id="@+id/text_view_colon_hour_minute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||
android:gravity="center"
|
||||
android:text="@string/tool_time_screen_colon"
|
||||
android:textColor="?attr/app_show_text_theme"
|
||||
android:textSize="100sp"
|
||||
android:textSize="@dimen/tool_time_screen_time_text_size"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextSwitcher
|
||||
android:id="@+id/text_switcher_minute_ten"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||
android:gravity="center"
|
||||
android:inAnimation="@anim/text_from_top_in"
|
||||
android:outAnimation="@anim/text_to_down_out" />
|
||||
@@ -65,7 +65,7 @@
|
||||
<TextSwitcher
|
||||
android:id="@+id/text_switcher_minute_one"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||
android:gravity="center"
|
||||
android:inAnimation="@anim/text_from_top_in"
|
||||
android:outAnimation="@anim/text_to_down_out" />
|
||||
@@ -73,17 +73,17 @@
|
||||
<TextView
|
||||
android:id="@+id/text_view_colon_minute_second"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||
android:gravity="center"
|
||||
android:text="@string/tool_time_screen_colon"
|
||||
android:textColor="?attr/app_show_text_theme"
|
||||
android:textSize="100sp"
|
||||
android:textSize="@dimen/tool_time_screen_time_text_size"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextSwitcher
|
||||
android:id="@+id/text_switcher_second_ten"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||
android:gravity="center"
|
||||
android:inAnimation="@anim/text_from_top_in"
|
||||
android:outAnimation="@anim/text_to_down_out" />
|
||||
@@ -91,7 +91,7 @@
|
||||
<TextSwitcher
|
||||
android:id="@+id/text_switcher_second_one"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:layout_height="@dimen/tool_time_screen_time_height"
|
||||
android:gravity="center"
|
||||
android:inAnimation="@anim/text_from_top_in"
|
||||
android:outAnimation="@anim/text_to_down_out" />
|
||||
@@ -101,7 +101,7 @@
|
||||
android:id="@+id/text_view_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:padding="@dimen/tool_time_screen_clickable_padding"
|
||||
android:textColor="?attr/app_show_second_text_theme"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
android:id="@+id/linear_layout_language"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_margin="@dimen/tool_translation_layout_margin"
|
||||
android:background="@drawable/background_top_bottom_radius"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
@@ -48,14 +48,14 @@
|
||||
android:gravity="center"
|
||||
android:text="@string/tool_translation_language_chinese"
|
||||
android:textColor="?attr/app_theme"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="@dimen/tool_translation_text_size" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_view_swap"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="Swap"
|
||||
android:padding="5dp"
|
||||
android:padding="@dimen/tool_translation_clickable_padding"
|
||||
android:src="@drawable/animation_swap_horizon" />
|
||||
|
||||
<TextView
|
||||
@@ -66,50 +66,50 @@
|
||||
android:gravity="center"
|
||||
android:text="@string/tool_translation_language_english"
|
||||
android:textColor="?attr/app_theme"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="@dimen/tool_translation_text_size" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_text_from"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_height="@dimen/tool_translation_edit_text_view_height"
|
||||
android:layout_margin="@dimen/tool_translation_layout_margin"
|
||||
android:autofillHints="text"
|
||||
android:background="@drawable/background_top_bottom_radius"
|
||||
android:gravity="start|top"
|
||||
android:hint="@string/tool_translation_please_enter_text"
|
||||
android:inputType="textMultiLine"
|
||||
android:maxLength="850"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingBottom="30dp"
|
||||
android:paddingHorizontal="@dimen/tool_translation_edit_text_view_padding"
|
||||
android:paddingTop="@dimen/tool_translation_edit_text_view_padding"
|
||||
android:paddingBottom="@dimen/tool_translation_edit_text_view_padding_plus"
|
||||
android:textColor="?attr/app_text_theme"
|
||||
android:textSize="16sp"
|
||||
android:textSize="@dimen/tool_translation_text_size"
|
||||
app:layout_constraintTop_toBottomOf="@id/linear_layout_language" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/edit_text_to"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_height="@dimen/tool_translation_edit_text_view_height"
|
||||
android:layout_margin="@dimen/tool_translation_layout_margin"
|
||||
android:autofillHints="text"
|
||||
android:background="@drawable/background_top_bottom_radius"
|
||||
android:gravity="start|top"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingTop="30dp"
|
||||
android:paddingBottom="15dp"
|
||||
android:paddingHorizontal="@dimen/tool_translation_edit_text_view_padding"
|
||||
android:paddingTop="@dimen/tool_translation_edit_text_view_padding_plus"
|
||||
android:paddingBottom="@dimen/tool_translation_edit_text_view_padding"
|
||||
android:textColor="?attr/app_text_theme"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="16sp"
|
||||
android:textSize="@dimen/tool_translation_text_size"
|
||||
app:layout_constraintTop_toBottomOf="@id/edit_text_from" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/background_round"
|
||||
android:padding="5dp"
|
||||
android:padding="@dimen/tool_translation_clickable_padding"
|
||||
app:layout_constraintBottom_toTopOf="@id/edit_text_to"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -123,7 +123,7 @@
|
||||
android:contentDescription="Translate"
|
||||
android:focusable="true"
|
||||
android:foreground="@drawable/foreground_ripple"
|
||||
android:src="@drawable/ic_translate"
|
||||
android:src="@drawable/ic_tool_translation_translate"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -6,14 +6,10 @@
|
||||
android:background="@drawable/background_side_nav_bar"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:padding="@dimen/nav_padding"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="Logo"
|
||||
@@ -28,7 +24,6 @@
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nav_header_subtitle" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/layout_item_LinearLayout"
|
||||
android:id="@+id/linear_layout_body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
@@ -11,11 +11,10 @@
|
||||
android:id="@+id/auto_linefeed_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginHorizontal="@dimen/common_layout_margin"
|
||||
android:background="@drawable/background_bottom_radius"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:paddingBottom="2dp" />
|
||||
android:paddingHorizontal="@dimen/fold_layout_body_auto_linefeed_layout_padding_horizontal"
|
||||
android:paddingBottom="@dimen/fold_layout_body_auto_linefeed_layout_padding_bottom" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -3,6 +3,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Button
|
||||
android:id="@+id/tool_button"
|
||||
android:id="@+id/button_tool"
|
||||
style="@style/ToolsButton" />
|
||||
</LinearLayout>
|
||||
@@ -1,26 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/fold_layout_head_layout"
|
||||
android:id="@+id/linear_layout_head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_height="@dimen/fold_layout_head_layout_height"
|
||||
android:layout_marginHorizontal="@dimen/common_layout_margin"
|
||||
android:layout_marginTop="@dimen/common_layout_margin"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fold_layout_icon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:id="@+id/text_view_icon"
|
||||
android:layout_width="@dimen/fold_layout_head_icon_size"
|
||||
android:layout_height="@dimen/fold_layout_head_icon_size"
|
||||
android:layout_marginHorizontal="@dimen/common_layout_margin"
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?attr/app_theme"
|
||||
android:textSize="20sp" />
|
||||
android:textSize="@dimen/common_text_size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fold_layout_text_view"
|
||||
android:id="@+id/text_view_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="@dimen/fold_layout_head_title_height"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="?attr/app_text_theme"
|
||||
@@ -28,9 +28,9 @@
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/fold_layout_arrow_icon"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:id="@+id/image_view_arrow"
|
||||
android:layout_width="@dimen/fold_layout_head_arrow_size"
|
||||
android:layout_height="@dimen/fold_layout_head_arrow_size"
|
||||
android:layout_marginHorizontal="@dimen/common_layout_margin"
|
||||
android:contentDescription="Arrow" />
|
||||
</LinearLayout>
|
||||
@@ -8,30 +8,30 @@
|
||||
tools:context=".ui.about.AboutFragment">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/app_icon"
|
||||
android:id="@+id/image_view_app_icon"
|
||||
android:layout_width="@dimen/about_app_icon_size"
|
||||
android:layout_height="@dimen/about_app_icon_size"
|
||||
android:layout_marginTop="@dimen/about_activity_margin_top"
|
||||
android:layout_marginTop="@dimen/about_layout_margin_top"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name"
|
||||
android:id="@+id/text_view_app_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/about_icon_text_margin"
|
||||
android:text="@string/app_full_name"
|
||||
android:textColor="?attr/app_text_theme"
|
||||
android:textSize="@dimen/default_text_size"
|
||||
android:textSize="@dimen/common_text_size"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/app_icon" />
|
||||
app:layout_constraintTop_toBottomOf="@id/image_view_app_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_desc"
|
||||
android:id="@+id/text_view_app_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/about_text_text_margin"
|
||||
@@ -40,23 +40,23 @@
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/app_name" />
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_app_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_version"
|
||||
android:id="@+id/text_view_app_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/about_text_text_margin"
|
||||
android:textColor="@color/app_secondary_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/app_desc" />
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_app_desc" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/open_source"
|
||||
android:id="@+id/text_view_open_source"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/about_activity_margin_bottom"
|
||||
android:layout_marginBottom="@dimen/about_layout_margin_bottom"
|
||||
android:text="@string/setting_open_source"
|
||||
android:textColor="?attr/app_theme"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
android:background="?attr/app_background_theme">
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/bottom_nav_view_pager"
|
||||
android:id="@+id/view_pager_bottom_nav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bottom_navigation_view"
|
||||
app:layout_constraintBottom_toTopOf="@+id/navigation_view_bottom_nav"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/bottom_navigation_view"
|
||||
android:id="@+id/navigation_view_bottom_nav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/app_theme"
|
||||
@@ -26,7 +26,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bottom_nav_view_pager"
|
||||
app:menu="@menu/bottom_nav_menu" />
|
||||
app:layout_constraintTop_toBottomOf="@id/view_pager_bottom_nav"
|
||||
app:menu="@menu/bottom_nav" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,18 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/fragment_home_tools"
|
||||
android:id="@+id/constraint_layout_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/app_background_theme"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.home.HomeFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fold_layouts_linear_layout"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp" />
|
||||
</ScrollView>
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/fragment_home_tools"
|
||||
android:id="@+id/constraint_layout_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/app_background_theme"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.home.tools.ToolsFragment">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/tools_recycler_view"
|
||||
android:id="@+id/recycler_view_tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -7,7 +7,7 @@
|
||||
tools:context=".ui.theme.ThemeFragment">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/theme_recycler_view"
|
||||
android:id="@+id/recycler_view_themes"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -4,133 +4,118 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/library_item_card_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/library_item_card_margin_vertical"
|
||||
android:layout_marginEnd="@dimen/library_item_card_margin_horizontal"
|
||||
android:layout_marginBottom="@dimen/library_item_card_margin_vertical"
|
||||
android:layout_margin="@dimen/item_libraries_card_margin"
|
||||
android:background="?attr/app_on_background_theme"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/app_on_background_theme"
|
||||
android:orientation="vertical">
|
||||
android:background="?attr/app_on_background_theme">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/library_name"
|
||||
android:id="@+id/text_view_library_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="@dimen/library_item_card_inner_padding"
|
||||
android:paddingLeft="@dimen/library_item_card_inner_padding"
|
||||
android:paddingTop="@dimen/library_item_card_inner_padding"
|
||||
android:paddingEnd="@dimen/library_item_card_inner_padding"
|
||||
android:paddingRight="@dimen/library_item_card_inner_padding"
|
||||
android:paddingTop="@dimen/item_libraries_card_inner_padding"
|
||||
android:paddingHorizontal="@dimen/item_libraries_card_inner_padding"
|
||||
android:textAppearance="?textAppearanceHeadline5"
|
||||
android:textColor="?attr/app_text_theme"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/library_creator"
|
||||
app:layout_constraintEnd_toStartOf="@+id/library_version"
|
||||
app:layout_constraintBottom_toTopOf="@+id/text_view_library_creator"
|
||||
app:layout_constraintEnd_toStartOf="@+id/text_view_library_version"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Library name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/library_creator"
|
||||
android:id="@+id/text_view_library_creator"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:paddingStart="@dimen/library_item_card_inner_padding"
|
||||
android:paddingLeft="@dimen/library_item_card_inner_padding"
|
||||
android:paddingEnd="@dimen/library_item_card_inner_padding"
|
||||
android:paddingRight="@dimen/library_item_card_inner_padding"
|
||||
android:paddingHorizontal="@dimen/item_libraries_card_inner_padding"
|
||||
android:textAppearance="?textAppearanceSubtitle1"
|
||||
android:textColor="?attr/app_second_text_theme"
|
||||
app:layout_constraintBottom_toTopOf="@+id/library_description_divider"
|
||||
app:layout_constraintEnd_toStartOf="@+id/library_version"
|
||||
app:layout_constraintBottom_toTopOf="@+id/view_library_description_divider"
|
||||
app:layout_constraintEnd_toStartOf="@+id/text_view_library_version"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/library_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/text_view_library_name"
|
||||
tools:text="Creator" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/library_version"
|
||||
android:id="@+id/text_view_library_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingTop="@dimen/library_item_card_inner_padding"
|
||||
android:paddingEnd="@dimen/library_item_card_inner_padding"
|
||||
android:paddingTop="@dimen/item_libraries_card_inner_padding"
|
||||
android:paddingEnd="@dimen/item_libraries_card_inner_padding"
|
||||
android:textAppearance="?textAppearanceBody2"
|
||||
android:textColor="?attr/app_second_text_theme"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/library_name"
|
||||
app:layout_constraintBottom_toBottomOf="@id/text_view_library_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/library_name"
|
||||
app:layout_constraintTop_toTopOf="@id/library_name"
|
||||
app:layout_constraintStart_toEndOf="@id/text_view_library_name"
|
||||
app:layout_constraintTop_toTopOf="@id/text_view_library_name"
|
||||
tools:text="Version" />
|
||||
|
||||
<View
|
||||
android:id="@+id/library_description_divider"
|
||||
android:id="@+id/view_library_description_divider"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginHorizontal="@dimen/library_item_card_divider_padding_horizontal"
|
||||
android:layout_marginVertical="@dimen/library_item_card_divider_padding_vertical"
|
||||
android:layout_height="@dimen/item_libraries_card_divider_height"
|
||||
android:layout_marginHorizontal="@dimen/item_libraries_card_divider_padding_horizontal"
|
||||
android:layout_marginVertical="@dimen/item_libraries_card_divider_padding_vertical"
|
||||
android:background="?attr/app_divider_theme"
|
||||
app:layout_constraintBottom_toTopOf="@id/library_description"
|
||||
app:layout_constraintBottom_toTopOf="@id/text_view_library_description"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/library_creator" />
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_library_creator" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/library_description"
|
||||
android:id="@+id/text_view_library_description"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/library_item_card_inner_padding"
|
||||
android:layout_marginEnd="@dimen/library_item_card_inner_padding"
|
||||
android:layout_marginHorizontal="@dimen/item_libraries_card_inner_padding"
|
||||
android:maxLines="20"
|
||||
android:textAppearance="?textAppearanceBody2"
|
||||
android:textColor="?attr/app_text_theme"
|
||||
app:layout_constraintBottom_toTopOf="@id/library_bottom_divider"
|
||||
app:layout_constraintBottom_toTopOf="@id/view_library_bottom_divider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/library_description_divider"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_library_description_divider"
|
||||
tools:text="This is library description.This is library description.This is library description.This is library description.This is library description.This is library description.This is library description.This is library description." />
|
||||
|
||||
<View
|
||||
android:id="@+id/library_bottom_divider"
|
||||
android:id="@+id/view_library_bottom_divider"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginHorizontal="@dimen/library_item_card_divider_padding_horizontal"
|
||||
android:layout_marginVertical="@dimen/library_item_card_divider_padding_vertical"
|
||||
android:layout_height="@dimen/item_libraries_card_divider_height"
|
||||
android:layout_marginHorizontal="@dimen/item_libraries_card_divider_padding_horizontal"
|
||||
android:layout_marginVertical="@dimen/item_libraries_card_divider_padding_vertical"
|
||||
android:background="?attr/app_divider_theme"
|
||||
app:layout_constraintBottom_toTopOf="@id/library_license"
|
||||
app:layout_constraintBottom_toTopOf="@id/text_view_library_license"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/library_description" />
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_library_description" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/library_license"
|
||||
android:id="@+id/text_view_library_license"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="@dimen/library_item_card_inner_padding"
|
||||
android:paddingLeft="@dimen/library_item_card_inner_padding"
|
||||
android:paddingEnd="@dimen/library_item_card_inner_padding"
|
||||
android:paddingRight="@dimen/library_item_card_inner_padding"
|
||||
android:paddingBottom="@dimen/library_item_card_inner_padding"
|
||||
android:paddingHorizontal="@dimen/item_libraries_card_inner_padding"
|
||||
android:paddingBottom="@dimen/item_libraries_card_inner_padding"
|
||||
android:textAppearance="?textAppearanceBody1"
|
||||
android:textColor="?attr/app_text_theme"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/library_bottom_divider"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_library_bottom_divider"
|
||||
tools:text="License" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -1,50 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/theme_layout"
|
||||
xmlns:tool="http://schemas.android.com/tools"
|
||||
android:id="@+id/linear_layout_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_margin="@dimen/common_layout_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/primary_color"
|
||||
android:id="@+id/linear_layout_primary_color"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="10dp"
|
||||
android:layout_height="@dimen/item_themes_primary_layout_height"
|
||||
android:background="@drawable/background_theme_top"
|
||||
android:orientation="horizontal">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/common_layout_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/color_name"
|
||||
android:id="@+id/text_view_color_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/setting_theme"
|
||||
android:textColor="?attr/app_on_theme"/>
|
||||
android:textColor="?attr/app_on_theme"
|
||||
tool:text="Theme" />
|
||||
|
||||
<View
|
||||
android:id="@+id/check"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="@drawable/selector_themes"/>
|
||||
android:id="@+id/view_check"
|
||||
android:layout_width="@dimen/item_themes_check_icon_size"
|
||||
android:layout_height="@dimen/item_themes_check_icon_size"
|
||||
android:background="@drawable/selector_themes" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/primary_dark_color"
|
||||
android:id="@+id/view_primary_dark_color"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_height="@dimen/item_themes_other_layout_height"
|
||||
android:background="@drawable/background_theme_middle" />
|
||||
|
||||
<View
|
||||
android:id="@+id/primary_light_color"
|
||||
android:id="@+id/view_primary_light_color"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_height="@dimen/item_themes_other_layout_height"
|
||||
android:background="@drawable/background_theme_middle" />
|
||||
|
||||
<View
|
||||
android:id="@+id/accent_color"
|
||||
android:id="@+id/view_accent_color"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_height="@dimen/item_themes_other_layout_height"
|
||||
android:background="@drawable/background_theme_bottom" />
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user