zoukankan      html  css  js  c++  java
  • 新建 SecondFragment 实现类


    package com.test.mvp.mvpdemo.mvp.v6.view;

    import android.os.Bundle;
    import android.support.annotation.Nullable;
    import android.widget.TextView;
    import android.widget.Toast;
    import com.test.mvp.mvpdemo.R;
    import com.test.mvp.mvpdemo.mvp.v6.SecondContract;
    import com.test.mvp.mvpdemo.mvp.v6.basemvp.BaseFragment;
    import com.test.mvp.mvpdemo.mvp.v6.inject.InjectPresenter;
    import com.test.mvp.mvpdemo.mvp.v6.presenter.SecondPresenter;

    public class SecondFragment extends BaseFragment implements SecondContract.ISecondView {

    private TextView tvFragment;

    @InjectPresenter
    private SecondPresenter mPresenter;

    @Override
    protected int setLayout() {
    return R.layout.fragment_second;
    }

    @Override
    protected void initViews(@Nullable Bundle savedInstanceState) {
    tvFragment = $(R.id.tv_fragment);
    }

    @Override
    protected void initData() {
    mPresenter.handlerData();
    }

    @Override
    public void showDialog() {
    // Toast.makeText(getContext(), "this is Fragment", Toast.LENGTH_SHORT).show();
    }

    @SuppressWarnings("ConstantConditions")
    @Override
    public void succes(String content) {
    getActivity().runOnUiThread(new Runnable() {
    @Override
    public void run(http://www.amjmh.com/v/BIBRGZ_558768/) {
    Toast.makeText(getContext(), "" + content, Toast.LENGTH_SHORT).show();
    tvFragment.setText(content);
    }
    });
    }

    }
    --------------------- 

  • 相关阅读:
    典型用户与场景
    团队工作总结
    《构建之法》第8,9,10章
    冲刺1,2,3,4,5,天
    Github以及推广
    四则运算安卓版ver.mk3
    软件工程APP进度更新
    团队会议之事后工作总结
    构建之法 13-17章有感
    对于其他小组评论的反馈
  • 原文地址:https://www.cnblogs.com/ly570/p/11299124.html
Copyright © 2011-2022 走看看