opt
@@ -13,7 +13,7 @@ ext {
|
||||
// androidx
|
||||
androidxappcompat : "androidx.appcompat:appcompat:1.0.2",
|
||||
androidxccorektx : "androidx.core:core-ktx:1.2.0",
|
||||
androidxconstraintlayout : "androidx.constraintlayout:constraintlayout:1.1.3",
|
||||
androidxconstraintlayout : "androidx.constraintlayout:constraintlayout:2.0.0-alpha5",
|
||||
androidxmultidex : "androidx.multidex:multidex:2.0.1",
|
||||
androidxviewpager2 : "androidx.viewpager2:viewpager2:1.0.0",
|
||||
androidxrecyclerview : "androidx.recyclerview:recyclerview:1.1.0",
|
||||
|
||||
@@ -21,7 +21,7 @@ public class MogoPoiSearchQuery implements Parcelable {
|
||||
private int pageSize;
|
||||
private boolean isCityLimit;
|
||||
private boolean isSubPois;
|
||||
private boolean isDistanceSort;
|
||||
private boolean isDistanceSort = true;
|
||||
private MogoLatLng location;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mogo.module.apps;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -8,7 +10,9 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.module.apps.adapter.AppIndicatorAdapter;
|
||||
import com.mogo.module.apps.anim.AnimWrapper;
|
||||
import com.mogo.module.apps.applaunch.AppLauncher;
|
||||
import com.mogo.module.apps.applaunch.BaseAppLauncher;
|
||||
import com.mogo.module.apps.applaunch.InternalFunctionLauncher;
|
||||
@@ -30,6 +34,10 @@ public class AppNavigatorFragment extends MvpFragment< AppNavigatorView, AppNavi
|
||||
private RecyclerView mNavigatorAppsList;
|
||||
private AppIndicatorAdapter mAppIndicatorAdapter;
|
||||
|
||||
private ImageView mAIAssist;
|
||||
private View mAIAssistContainer;
|
||||
private AnimWrapper mAnim = new AnimWrapper();
|
||||
|
||||
private BaseAppLauncher mLauncher;
|
||||
|
||||
@Override
|
||||
@@ -39,10 +47,7 @@ public class AppNavigatorFragment extends MvpFragment< AppNavigatorView, AppNavi
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
// mApps.setOnClickListener( view -> {
|
||||
// openAppsPanel();
|
||||
// trackNavigatorClickEvent( 4 );
|
||||
// } );
|
||||
|
||||
mLauncher = new InternalFunctionLauncher( getActivity() );
|
||||
mLauncher.setNext( new AppLauncher() );
|
||||
|
||||
@@ -53,6 +58,48 @@ public class AppNavigatorFragment extends MvpFragment< AppNavigatorView, AppNavi
|
||||
mLauncher.launch( getContext(), data );
|
||||
} );
|
||||
mNavigatorAppsList.setAdapter( mAppIndicatorAdapter );
|
||||
|
||||
mAIAssistContainer = findViewById( R.id.module_apps_id_ai_assist_container );
|
||||
mAIAssist = findViewById( R.id.module_apps_id_ai_assist );
|
||||
mAnim.initAnim( mAIAssist );
|
||||
mAIAssist.setOnClickListener( view -> {
|
||||
AIAssist.startAssistant( getContext() );
|
||||
AppServiceHandler.getApis().getAnalyticsApi().track( "Launcher_xiaozhi_Click", null );
|
||||
} );
|
||||
mAIAssistContainer.setOnClickListener( view -> {
|
||||
mAIAssist.performClick();
|
||||
} );
|
||||
|
||||
AppServiceHandler.getApis().getFragmentManagerApi().addMainFragmentStackTransactionListener( size -> {
|
||||
// 主页 fragment 栈变化的时候,改变动画状态
|
||||
if ( size == 0 ) {
|
||||
mAnim.start();
|
||||
} else {
|
||||
mAnim.stop();
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideNavigationEntrance() {
|
||||
mAppIndicatorAdapter.setDatas( NavigatorApps.getAppsWithoutNavigation() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showNavigationEntrance() {
|
||||
mAppIndicatorAdapter.setDatas( NavigatorApps.getApps() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mAnim.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mAnim.stop();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.map.navi.IMogoNaviListener2;
|
||||
import com.mogo.module.apps.model.AppsModel;
|
||||
import com.mogo.module.apps.utils.LaunchUtils;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
@@ -26,7 +27,9 @@ import org.json.JSONObject;
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class AppNavigatorPresenter extends Presenter< AppNavigatorView > implements IMogoIntentListener, IMogoVoiceCmdCallBack {
|
||||
public class AppNavigatorPresenter extends Presenter< AppNavigatorView > implements IMogoIntentListener,
|
||||
IMogoVoiceCmdCallBack,
|
||||
IMogoNaviListener2 {
|
||||
|
||||
private static final String TAG = "AppNavigatorPresenter";
|
||||
|
||||
@@ -42,6 +45,7 @@ public class AppNavigatorPresenter extends Presenter< AppNavigatorView > impleme
|
||||
super.onCreate( owner );
|
||||
mIntentManager = AppServiceHandler.getApis().getIntentManagerApi();
|
||||
mMogoStatusManager = AppServiceHandler.getApis().getStatusManagerApi();
|
||||
AppServiceHandler.getApis().getRegisterCenterApi().registerMogoNaviListener( TAG, this );
|
||||
// 预加载应用列表,空间换时间
|
||||
AppsModel.getInstance( getContext() ).load( null );
|
||||
}
|
||||
@@ -106,26 +110,6 @@ public class AppNavigatorPresenter extends Presenter< AppNavigatorView > impleme
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCmdAction( String speakText ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCmdCancel( String speakText ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSpeakEnd( String speakText ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSpeakSelectTimeOut( String speakText ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy( @NonNull LifecycleOwner owner ) {
|
||||
if ( mIntentManager != null ) {
|
||||
@@ -133,4 +117,14 @@ public class AppNavigatorPresenter extends Presenter< AppNavigatorView > impleme
|
||||
}
|
||||
super.onDestroy( owner );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartNavi() {
|
||||
mView.hideNavigationEntrance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopNavi() {
|
||||
mView.showNavigationEntrance();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,4 +15,8 @@ public interface AppNavigatorView extends IView {
|
||||
* 打开全部应用
|
||||
*/
|
||||
void openAppsPanel();
|
||||
|
||||
void hideNavigationEntrance();
|
||||
|
||||
void showNavigationEntrance();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.extensions.anim;
|
||||
package com.mogo.module.apps.anim;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.module.extensions.anim;
|
||||
package com.mogo.module.apps.anim;
|
||||
|
||||
import com.mogo.module.extensions.R;
|
||||
|
||||
import com.mogo.module.apps.R;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.module.extensions.anim;
|
||||
package com.mogo.module.apps.anim;
|
||||
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.mogo.module.apps.R;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.extensions.anim;
|
||||
package com.mogo.module.apps.anim;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
@@ -13,7 +13,6 @@ import android.util.AttributeSet;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.extensions.anim;
|
||||
package com.mogo.module.apps.anim;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.module.extensions.anim;
|
||||
package com.mogo.module.apps.anim;
|
||||
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
|
||||
@@ -13,15 +13,25 @@ import java.util.List;
|
||||
*/
|
||||
public class NavigatorApps {
|
||||
|
||||
private static List< AppInfo > sApps = new ArrayList<>();
|
||||
private static AppInfo app = new AppInfo( "导航", "com.mogo.launcher.navi.search", "", 0, null, R.drawable.module_apps_ic_navigator_navi );
|
||||
private static AppInfo app2 = new AppInfo( "音乐", "com.pvetec.musics", "", 0, null, R.drawable.module_apps_ic_navigator_media );
|
||||
private static AppInfo app3 = new AppInfo( "个人中心", "com.zhidao.auto.personal", "", 0, null, R.drawable.module_apps_ic_navigator_personcenter );
|
||||
private static AppInfo app4 = new AppInfo( "全部应用", "com.mogo.launcher.applist", "", 0, null, R.drawable.module_apps_ic_navigator_applist );
|
||||
|
||||
public static List< AppInfo > getApps() {
|
||||
if ( sApps.isEmpty() ) {
|
||||
sApps.add( new AppInfo( "导航", "com.mogo.launcher.navi.search", "", 0, null, R.drawable.module_apps_ic_apps ) );
|
||||
sApps.add( new AppInfo( "音乐", "com.pvetec.musics", "", 0, null, R.drawable.module_apps_ic_apps ) );
|
||||
sApps.add( new AppInfo( "个人中心", "com.zhidao.auto.personal", "", 0, null, R.drawable.module_apps_ic_apps ) );
|
||||
sApps.add( new AppInfo( "全部应用", "com.mogo.launcher.applist", "", 0, null, R.drawable.module_apps_ic_apps ) );
|
||||
}
|
||||
List< AppInfo > sApps = new ArrayList<>();
|
||||
sApps.add( app );
|
||||
sApps.add( app2 );
|
||||
sApps.add( app3 );
|
||||
sApps.add( app4 );
|
||||
return sApps;
|
||||
}
|
||||
|
||||
public static List< AppInfo > getAppsWithoutNavigation() {
|
||||
List< AppInfo > sApps = new ArrayList<>();
|
||||
sApps.add( app2 );
|
||||
sApps.add( app3 );
|
||||
sApps.add( app4 );
|
||||
return sApps;
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |