add: custom shortcut icon
This commit is contained in:
BIN
app/src/main/res/drawable-xhdpi/ic_insert_photo_white_48dp.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_insert_photo_white_48dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners android:radius="4dp"/>
|
||||
|
||||
<solid android:color="#727379"/>
|
||||
|
||||
</shape>
|
||||
32
app/src/main/res/layout/activity_shortcut_icon_select.xml
Normal file
32
app/src/main/res/layout/activity_shortcut_icon_select.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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.support.design.widget.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:title="@string/_app_name"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/apps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"/>
|
||||
|
||||
</LinearLayout>
|
||||
8
app/src/main/res/layout/app_icon_list_item.xml
Normal file
8
app/src/main/res/layout/app_icon_list_item.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="8dp">
|
||||
|
||||
</ImageView>
|
||||
31
app/src/main/res/layout/shortcut_create_dialog.xml
Normal file
31
app/src/main/res/layout/shortcut_create_dialog.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/select_icon"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@drawable/shortcut_create_dialog_icon_bg"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_add_white_48dp"/>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/text_name"/>
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -12,6 +12,9 @@
|
||||
<item
|
||||
android:id="@+id/delete"
|
||||
android:title="@string/text_delete"/>
|
||||
<item
|
||||
android:id="@+id/floating_edit"
|
||||
android:title="@string/text_floating_edit"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/create_shortcut"
|
||||
|
||||
10
app/src/main/res/menu/menu_shortcut_icon_select.xml
Normal file
10
app/src/main/res/menu/menu_shortcut_icon_select.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_select_image"
|
||||
android:icon="@drawable/ic_insert_photo_white_48dp"
|
||||
android:title="@string/text_select_image"
|
||||
app:showAsAction="always"/>
|
||||
</menu>
|
||||
@@ -45,7 +45,7 @@
|
||||
<string name="text_start_running">开始运行</string>
|
||||
<string name="text_open_by_other_apps">用其他应用打开</string>
|
||||
<string name="text_rename">重命名</string>
|
||||
<string name="text_send_shortcut">创建桌面快捷方式</string>
|
||||
<string name="text_send_shortcut">创建快捷方式</string>
|
||||
<string name="text_already_create">已创建</string>
|
||||
<string name="text_delete">删除</string>
|
||||
<string name="text_already_delete">已删除</string>
|
||||
@@ -263,6 +263,8 @@
|
||||
<string name="apk_builder_clean">清理临时文件</string>
|
||||
<string name="text_source_file_path">脚本文件路径</string>
|
||||
<string name="text_search">搜索</string>
|
||||
<string name="text_floating_edit">悬浮编辑</string>
|
||||
<string name="text_select_icon">选择图标</string>
|
||||
|
||||
|
||||
<string-array name="ad_showing_mode_keys">
|
||||
|
||||
Reference in New Issue
Block a user