mirror of
https://github.com/He4eT/yamf_launcher.git
synced 2026-05-05 09:57:26 +00:00
Added a long-press menu (info, delete, hide, rename). Rename not done. Others work.
This commit is contained in:
parent
57721ac89b
commit
71338fb9f1
10 changed files with 249 additions and 615 deletions
15
app/src/main/res/drawable/app_action_foreground.xml
Normal file
15
app/src/main/res/drawable/app_action_foreground.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Pressed state -->
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#0FFFFFFF"/> <!-- Change color to indicate pressed state -->
|
||||
</shape>
|
||||
</item>
|
||||
<!-- Normal state -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#00FFFFFF"/> <!-- Change color to indicate normal state -->
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
51
app/src/main/res/layout/app_action_menu.xml
Normal file
51
app/src/main/res/layout/app_action_menu.xml
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#6F000000">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:foreground="@drawable/app_action_foreground"
|
||||
android:drawableTop="@android:drawable/ic_menu_info_details"
|
||||
android:text="Info"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#F3F3F3FF" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uninstall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:foreground="@drawable/app_action_foreground"
|
||||
android:drawableTop="@android:drawable/ic_menu_delete"
|
||||
android:text="Uninstall"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#F3F3F3FF" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rename"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:foreground="@drawable/app_action_foreground"
|
||||
android:drawableTop="@android:drawable/ic_menu_edit"
|
||||
android:text="Rename"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#F3F3F3FF" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hide"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:foreground="@drawable/app_action_foreground"
|
||||
android:drawableTop="@android:drawable/ic_menu_view"
|
||||
android:text="Hide"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#F3F3F3FF" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/app_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_weight="0.9"
|
||||
android:fadingEdge="none"
|
||||
android:fillViewport="true"
|
||||
android:requiresFadingEdge="vertical"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fadingEdge="none"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"/>
|
||||
</ScrollView>
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/app_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_weight="0.9"
|
||||
android:fadingEdge="none"
|
||||
android:fillViewport="true"
|
||||
android:requiresFadingEdge="vertical"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fadingEdge="none"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Buttons dynamically added here -->
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
Loading…
Add table
Add a link
Reference in a new issue