diff options
author | YuutaW <17158086+Trumeet@users.noreply.github.com> | 2019-02-24 11:59:17 -0800 |
---|---|---|
committer | YuutaW <17158086+Trumeet@users.noreply.github.com> | 2019-02-24 11:59:17 -0800 |
commit | a08328403be84d85c006f801169a3feed0d956a4 (patch) | |
tree | ceebece6443a3e6662a4937b911c58904bb5b1ff /app/src/main/res/layout | |
download | WorkMode-a08328403be84d85c006f801169a3feed0d956a4.tar WorkMode-a08328403be84d85c006f801169a3feed0d956a4.tar.gz WorkMode-a08328403be84d85c006f801169a3feed0d956a4.tar.bz2 WorkMode-a08328403be84d85c006f801169a3feed0d956a4.zip |
First Commit
Signed-off-by: YuutaW <17158086+Trumeet@users.noreply.github.com>
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/activity_application_picker.xml | 33 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_main.xml | 91 | ||||
-rw-r--r-- | app/src/main/res/layout/item_application.xml | 31 | ||||
-rw-r--r-- | app/src/main/res/layout/item_application_select.xml | 42 | ||||
-rw-r--r-- | app/src/main/res/layout/switch_bar.xml | 51 |
5 files changed, 248 insertions, 0 deletions
diff --git a/app/src/main/res/layout/activity_application_picker.xml b/app/src/main/res/layout/activity_application_picker.xml new file mode 100644 index 0000000..2dfaac2 --- /dev/null +++ b/app/src/main/res/layout/activity_application_picker.xml @@ -0,0 +1,33 @@ +<?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" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/recycler_apps" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintBottom_toBottomOf="parent"/> + + <ProgressBar + android:id="@+id/progress_load" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent" /> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/fab_ok" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="16dp" + android:layout_marginBottom="16dp" + android:src="@drawable/ic_check_24dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent"/> +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..23f0416 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,91 @@ +<?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" + tools:context=".MainActivity"> + + <com.android.settings.widget.SwitchBar + android:id="@+id/switch_bar" + android:layout_height="?attr/actionBarSize" + android:layout_width="match_parent" + android:theme="?attr/switchBarTheme" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent"/> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintTop_toBottomOf="@id/switch_bar" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent"> + <ProgressBar + android:id="@+id/progress_apply" + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toTopOf="@id/guideline" + android:indeterminate="true" + android:paddingTop="-4dp" + style="@style/Widget.AppCompat.ProgressBar.Horizontal"/> + + <androidx.constraintlayout.widget.Guideline + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/guideline" + android:orientation="horizontal" + app:layout_constraintGuide_begin="2dp" /> + </androidx.constraintlayout.widget.ConstraintLayout> + + <com.google.android.material.tabs.TabLayout + android:id="@+id/tab" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:layout_constraintTop_toBottomOf="@id/switch_bar" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" /> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="0dp" + app:layout_constraintTop_toBottomOf="@id/tab" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent"> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/recycler_apps" + android:layout_width="match_parent" + android:layout_height="0dp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent"/> + + <TextView + android:id="@+id/welcome_tip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + tools:text="@string/blacklist_welcome" + android:textAppearance="@style/TextAppearance.AppCompat.Body1"/> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/fab_add" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="16dp" + android:layout_marginBottom="16dp" + android:src="@drawable/ic_add_24dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintBottom_toBottomOf="parent"/> +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_application.xml b/app/src/main/res/layout/item_application.xml new file mode 100644 index 0000000..7ab17dc --- /dev/null +++ b/app/src/main/res/layout/item_application.xml @@ -0,0 +1,31 @@ +<?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="56dp"> + <ImageView + android:id="@android:id/icon" + android:layout_width="48dp" + android:layout_height="48dp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" + android:layout_marginStart="16dp" + app:layout_constraintStart_toStartOf="parent" + tools:src="@android:mipmap/sym_def_app_icon"/> + + <TextView + android:id="@android:id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintStart_toEndOf="@android:id/icon" + android:layout_marginStart="16dp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + android:textSize="16sp" + android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2" + tools:text="App"/> +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_application_select.xml b/app/src/main/res/layout/item_application_select.xml new file mode 100644 index 0000000..c5068d4 --- /dev/null +++ b/app/src/main/res/layout/item_application_select.xml @@ -0,0 +1,42 @@ +<?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="56dp"> + <ImageView + android:id="@android:id/icon" + android:layout_width="48dp" + android:layout_height="48dp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" + android:layout_marginStart="16dp" + app:layout_constraintStart_toStartOf="parent" + tools:src="@android:mipmap/sym_def_app_icon"/> + + <TextView + android:id="@android:id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintStart_toEndOf="@android:id/icon" + android:layout_marginStart="16dp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + android:textSize="16sp" + android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2" + tools:text="App"/> + + <CheckBox + android:id="@android:id/checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + android:layout_marginEnd="16dp" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp"/> +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/switch_bar.xml b/app/src/main/res/layout/switch_bar.xml new file mode 100644 index 0000000..b95c6ea --- /dev/null +++ b/app/src/main/res/layout/switch_bar.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2014, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<merge xmlns:android="http://schemas.android.com/apk/res/android"> + + <TextView + android:id="@+id/switch_text" + android:layout_height="wrap_content" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_gravity="center_vertical" + android:maxLines="2" + android:ellipsize="end" + android:textAppearance="@style/TextAppearance.Switch" + android:textColor="?android:attr/textColorPrimary" + android:textSize="18sp" + android:textAlignment="viewStart" /> + + <ImageView + android:id="@+id/restricted_icon" + android:layout_width="@dimen/restricted_icon_size" + android:layout_height="@dimen/restricted_icon_size" + android:theme="@android:style/Theme.Material" + android:layout_gravity="center_vertical" + android:layout_marginEnd="@dimen/restricted_icon_margin_end" + android:visibility="gone" /> + + <com.android.settings.widget.ToggleSwitch + android:id="@+id/switch_widget" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:theme="@style/Widget.SwitchBar.Switch" /> + +</merge>
\ No newline at end of file |