mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-06-19 23:50:58 +00:00
Introduce support for icon packs
This commit is contained in:
parent
c977b9a064
commit
4f38988c0d
44 changed files with 2128 additions and 54 deletions
19
app/src/main/res/layout/card_icon.xml
Normal file
19
app/src/main/res/layout/card_icon.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:padding="5dp"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="vertical">
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_height="75dp"
|
||||
android:layout_width="match_parent"/>
|
||||
<TextView
|
||||
android:id="@+id/icon_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
25
app/src/main/res/layout/card_icon_category.xml
Normal file
25
app/src/main/res/layout/card_icon_category.xml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:paddingVertical="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
<TextView
|
||||
android:id="@+id/icon_category"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="15sp" />
|
||||
<ImageView
|
||||
android:id="@+id/icon_category_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_chevron_down_black_24dp"
|
||||
app:tint="?attr/iconColorPrimary"
|
||||
android:layout_gravity="center_vertical" />
|
||||
</LinearLayout>
|
69
app/src/main/res/layout/card_icon_pack.xml
Normal file
69
app/src/main/res/layout/card_icon_pack.xml
Normal file
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/button_edit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingTop="12.5dp"
|
||||
android:paddingBottom="12.5dp"
|
||||
android:foreground="?android:attr/selectableItemBackground">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_icon_pack_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_icon_pack_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Caption" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/darker_gray"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:layout_marginTop="12.5dp"
|
||||
android:layout_marginBottom="12.5dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/button_delete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingTop="12.5dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingBottom="12.5dp"
|
||||
android:src="@drawable/ic_delete_black_24dp"
|
||||
app:tint="?attr/iconColorPrimary" />
|
||||
|
||||
</LinearLayout>
|
82
app/src/main/res/layout/dialog_icon_picker.xml
Normal file
82
app/src/main/res/layout/dialog_icon_picker.xml
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
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"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<View
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/drag_handle" />
|
||||
<TextView
|
||||
android:paddingTop="8dp"
|
||||
android:textSize="17sp"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/primaryText"
|
||||
android:text="@string/pick_icon" />
|
||||
<TextView
|
||||
android:id="@+id/text_icon_pack"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:textSize="13sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
|
||||
</LinearLayout>
|
||||
<ImageButton
|
||||
android:id="@+id/btn_icon_pack"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_dots_vertical_black_24dp"
|
||||
android:tint="?attr/iconColorPrimary"/>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/divider2" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:orientation="vertical">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:hint="@string/search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
app:endIconMode="clear_text">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/text_search_icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<com.beemdevelopment.aegis.ui.views.IconRecyclerView
|
||||
android:id="@+id/list_icons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_marginTop="10dp"
|
||||
android:columnWidth="75dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
81
app/src/main/res/layout/fragment_icon_packs.xml
Normal file
81
app/src/main/res/layout/fragment_icon_packs.xml
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
|
||||
android:background="?attr/cardBackground">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center|fill_vertical"
|
||||
android:id="@+id/vEmptyList"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="150dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/ic_package_variant_black_24dp"
|
||||
app:tint="?attr/primaryText" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/no_icon_packs_title"
|
||||
android:paddingTop="17dp"
|
||||
android:textColor="?attr/primaryText"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_no_icon_packs"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:paddingTop="7dp"
|
||||
android:text="@string/no_icon_packs"
|
||||
android:textAlignment="center" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/view_icon_packs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list_icon_packs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="vertical"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:src="@drawable/ic_add_black_24dp"
|
||||
app:tint="@color/icon_primary_dark">
|
||||
</com.google.android.material.floatingactionbutton.FloatingActionButton>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
Loading…
Add table
Add a link
Reference in a new issue