mirror of
https://gitee.com/willfree/min-vpn-client_v2.git
synced 2026-10-04 19:42:00 +08:00
writting activity/welcome:在写welcome
This commit is contained in:
1 parent
309dc55cf3
commit
392aec0de9
5 files changed
+100
-8
No files matched your search
@@ -9,34 +9,29 @@ package com.pkusz.min_vpn_client.activity.base;
|
||||
|
||||
import android.widget.Toast;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import cn.qjm253.quick_android_base.base.activity.BaseQuickAndroidActivity;
|
||||
import cn.qjm253.quick_android_mvp.base.activity.BaseQuickAndroidMVPActivity;
|
||||
|
||||
public abstract class MINVpnBaseActivity<BasePresenter>
|
||||
extends BaseQuickAndroidActivity
|
||||
public abstract class MINVpnBaseActivity<BasePresenter extends cn.qjm253.quick_android_mvp.base.mvp.BasePresenter<?, ?>>
|
||||
extends BaseQuickAndroidMVPActivity<BasePresenter>
|
||||
implements MINVpnBaseView{
|
||||
|
||||
|
||||
public void showWarning(String msg){
|
||||
toast(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showSuccess(String msg){
|
||||
toast(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String msg){
|
||||
toast(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
EventBus.getDefault().unregister(this);
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.pkusz.min_vpn_client.activity.welcome;
|
||||
/*
|
||||
* @Author: Wang Feng
|
||||
* @Description:
|
||||
* @Version: 1.0.0
|
||||
* @Date: 20:45 2021/6/23
|
||||
* @Copyright: MIN-Group;国家重大科技基础设施——未来网络北大实验室;深圳市信息论与未来网络重点实验室
|
||||
*/
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.PersistableBundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.pkusz.min_vpn_client.R;
|
||||
import com.pkusz.min_vpn_client.activity.base.MINVpnBaseActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BaseView;
|
||||
|
||||
public class WelcomeActivity extends MINVpnBaseActivity<WelcomeActivityPresenter>
|
||||
implements WelcomeActivityContract.View, BaseView {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_welcome);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public WelcomeActivityPresenter onCreatePresenter() {
|
||||
return new WelcomeActivityPresenter(this);
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.pkusz.min_vpn_client.activity.welcome;
|
||||
/*
|
||||
* @Author: Wang Feng
|
||||
* @Description:
|
||||
* @Version: 1.0.0
|
||||
* @Date: 20:31 2021/6/23
|
||||
* @Copyright: MIN-Group;国家重大科技基础设施——未来网络北大实验室;深圳市信息论与未来网络重点实验室
|
||||
*/
|
||||
|
||||
import com.pkusz.min_vpn_client.activity.base.MINVpnBaseView;
|
||||
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BaseModel;
|
||||
import cn.qjm253.quick_android_mvp.base.mvp.BasePresenter;
|
||||
|
||||
public interface WelcomeActivityContract {
|
||||
interface View extends MINVpnBaseView{
|
||||
|
||||
}
|
||||
|
||||
interface Model extends BaseModel{
|
||||
|
||||
}
|
||||
|
||||
abstract class Presenter extends BasePresenter<View,Model>{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.pkusz.min_vpn_client.activity.welcome;
|
||||
/*
|
||||
* @Author: Wang Feng
|
||||
* @Description:
|
||||
* @Version: 1.0.0
|
||||
* @Date: 21:01 2021/6/23
|
||||
* @Copyright: MIN-Group;国家重大科技基础设施——未来网络北大实验室;深圳市信息论与未来网络重点实验室
|
||||
*/
|
||||
|
||||
public class WelcomeActivityModel implements WelcomeActivityContract.Model{
|
||||
public WelcomeActivityModel(WelcomeActivityPresenter Presenter){
|
||||
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.pkusz.min_vpn_client.activity.welcome;
|
||||
/*
|
||||
* @Author: Wang Feng
|
||||
* @Description:
|
||||
* @Version: 1.0.0
|
||||
* @Date: 20:40 2021/6/23
|
||||
* @Copyright: MIN-Group;国家重大科技基础设施——未来网络北大实验室;深圳市信息论与未来网络重点实验室
|
||||
*/
|
||||
|
||||
public class WelcomeActivityPresenter extends WelcomeActivityContract.Presenter {
|
||||
public WelcomeActivityPresenter(WelcomeActivity welcomeActivity){
|
||||
mView=welcomeActivity;
|
||||
mModel=new WelcomeActivityModel(this);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user