This commit is contained in:
wangcongtao
2020-11-29 11:26:51 +08:00
parent cfb73c0222
commit 909c8794a5
29 changed files with 61 additions and 21 deletions

View File

@@ -24,8 +24,8 @@ public class AppIndicatorAdapter extends RecycleBaseAdapter< AppInfo > {
@Override
public void onBindViewHolder( RecycleViewHolder holder, AppInfo app, int position ) {
ImageView ivIndicator = holder.getView( R.id.module_apps_id_app_icon );
ivIndicator.setImageResource( app.getIconResId() );
holder.itemView.setOnClickListener( view -> {
ivIndicator.setBackgroundResource( app.getIconResId() );
ivIndicator.setOnClickListener( ( view ) -> {
if ( getOnItemClickedListener() != null ) {
getOnItemClickedListener().onItemClicked( app, position );
}

View File

@@ -13,12 +13,12 @@ import java.util.List;
*/
public class NavigatorApps {
private static AppInfo app = new AppInfo( "高德地图", "com.autonavi.amapauto", "", 0, null, R.drawable.module_apps_ic_navigator_navi, 1 );
private static AppInfo app = new AppInfo( "高德地图", "com.autonavi.amapauto", "", 0, null, R.drawable.module_apps_ic_navigator_navi_selector, 1 );
private static AppInfo app_ = new AppInfo( "高德地图", "com.autonavi.amapauto", "", 0, null, R.drawable.module_apps_ic_navigator_navi_disable, 1 );
// private static AppInfo app2 = new AppInfo( "音乐", "com.tencent.wecarflow", "", 0, null, R.drawable.module_apps_ic_navigator_media, 2 );
private static AppInfo app2 = new AppInfo( "音乐", "com.zhidao.music", "", 0, null, R.drawable.module_apps_ic_navigator_media, 2 );
private static AppInfo app3 = new AppInfo( "车聊聊", "com.zhidao.imdemo", "", 0, null, R.drawable.module_apps_ic_navigator_im, 6 );
private static AppInfo app4 = new AppInfo( "全部应用", "com.mogo.launcher.applist", "", 0, null, R.drawable.module_apps_ic_navigator_applist, 4 );
private static AppInfo app2 = new AppInfo( "音乐", "com.zhidao.music", "", 0, null, R.drawable.module_apps_ic_navigator_media_selector, 2 );
private static AppInfo app3 = new AppInfo( "车聊聊", "com.zhidao.imdemo", "", 0, null, R.drawable.module_apps_ic_navigator_im_selector, 6 );
private static AppInfo app4 = new AppInfo( "全部应用", "com.mogo.launcher.applist", "", 0, null, R.drawable.module_apps_ic_navigator_applist_selector, 4 );
public static List< AppInfo > getApps() {
List< AppInfo > sApps = new ArrayList<>();

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_applist_pressed"/>
<item android:drawable="@drawable/module_apps_ic_navigator_applist" />
</selector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_im_pressed"/>
<item android:drawable="@drawable/module_apps_ic_navigator_im" />
</selector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_media_pressed"/>
<item android:drawable="@drawable/module_apps_ic_navigator_media" />
</selector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_navi_pressed"/>
<item android:drawable="@drawable/module_apps_ic_navigator_navi" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_service_marker_anchor_size">16dp</dimen>
<dimen name="module_service_marker_dot_marginTop">2dp</dimen>
<dimen name="module_service_marker_bubble_width">56px</dimen>
<dimen name="module_service_marker_bubble_height">65px</dimen>
<dimen name="module_service_marker_dot_marginTop">2px</dimen>
<dimen name="module_service_marker_bubble_width">70px</dimen>
<dimen name="module_service_marker_bubble_height">76px</dimen>
<dimen name="module_service_marker_bubble_icon_width">35px</dimen>
<dimen name="module_service_marker_bubble_icon_height">35px</dimen>
<dimen name="module_service_marker_bubble_icon_marginBottom">4px</dimen>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_service_marker_anchor_size">16dp</dimen>
<dimen name="module_service_marker_dot_marginTop">2dp</dimen>
<dimen name="module_service_marker_bubble_width">56px</dimen>
<dimen name="module_service_marker_bubble_height">65px</dimen>
<dimen name="module_service_marker_dot_marginTop">2px</dimen>
<dimen name="module_service_marker_bubble_width">70px</dimen>
<dimen name="module_service_marker_bubble_height">76px</dimen>
<dimen name="module_service_marker_bubble_icon_width">35px</dimen>
<dimen name="module_service_marker_bubble_icon_height">35px</dimen>
<dimen name="module_service_marker_bubble_icon_marginBottom">4px</dimen>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_service_marker_anchor_size">20dp</dimen>
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
<dimen name="module_service_marker_bubble_width">100px</dimen>
<dimen name="module_service_marker_bubble_height">117px</dimen>
<dimen name="module_service_marker_dot_marginTop">4px</dimen>
<dimen name="module_service_marker_bubble_width">120px</dimen>
<dimen name="module_service_marker_bubble_height">130px</dimen>
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
<dimen name="module_service_marker_bubble_icon_height">60px</dimen>
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_service_marker_anchor_size">20dp</dimen>
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
<dimen name="module_service_marker_bubble_width">100px</dimen>
<dimen name="module_service_marker_bubble_height">117px</dimen>
<dimen name="module_service_marker_dot_marginTop">4px</dimen>
<dimen name="module_service_marker_bubble_width">120px</dimen>
<dimen name="module_service_marker_bubble_height">130px</dimen>
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
<dimen name="module_service_marker_bubble_icon_height">60px</dimen>
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_service_marker_anchor_size">20dp</dimen>
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
<dimen name="module_service_marker_bubble_width">100px</dimen>
<dimen name="module_service_marker_bubble_height">117px</dimen>
<dimen name="module_service_marker_dot_marginTop">4px</dimen>
<dimen name="module_service_marker_bubble_width">120px</dimen>
<dimen name="module_service_marker_bubble_height">130px</dimen>
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
<dimen name="module_service_marker_bubble_icon_height">60px</dimen>
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_applist_pressed_light"/>
<item android:drawable="@drawable/module_apps_ic_navigator_applist_light" />
</selector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_im_pressed_light"/>
<item android:drawable="@drawable/module_apps_ic_navigator_im_light" />
</selector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_media_pressed_light"/>
<item android:drawable="@drawable/module_apps_ic_navigator_media_light" />
</selector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/module_apps_ic_navigator_navi_pressed_light"/>
<item android:drawable="@drawable/module_apps_ic_navigator_navi_light" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 14 KiB