opt
This commit is contained in:
@@ -39,6 +39,7 @@ import com.mogo.module.share.ShareControl;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
@@ -221,6 +222,8 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
}
|
||||
}
|
||||
} );
|
||||
MogoEntranceButtons.save( ButtonIndex.BUTTON1, findViewById( R.id.module_entrance_id_button1 ) );
|
||||
MogoEntranceButtons.save( ButtonIndex.BUTTON2, findViewById( R.id.module_entrance_id_button2 ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
import com.mogo.service.entrance.IMogoEntranceButtonController;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-16
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
@Route( path = MogoServicePaths.PATH_ENTRANCE_BUTTON_API )
|
||||
public class MogoEntranceButtonControllerImpl implements IMogoEntranceButtonController {
|
||||
|
||||
@Override
|
||||
public TextView getButton( ButtonIndex index ) {
|
||||
return MogoEntranceButtons.getButton( index );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-16
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoEntranceButtons {
|
||||
|
||||
private static Map< ButtonIndex, TextView > sButtons = new HashMap<>();
|
||||
|
||||
public static void save( ButtonIndex index, TextView btn ) {
|
||||
sButtons.put( index, btn );
|
||||
}
|
||||
|
||||
public static TextView getButton( ButtonIndex index ) {
|
||||
return sButtons.get( index );
|
||||
}
|
||||
|
||||
public static void clear() {
|
||||
sButtons.clear();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user