zoukankan      html  css  js  c++  java
  • 第一阶段SCRUM冲刺-03

    import android.app.AlertDialog;
    import android.content.DialogInterface;
    import android.content.Intent;
    import android.net.Uri;
    import android.os.Bundle;
    import android.support.annotation.NonNull;
    import android.support.annotation.Nullable;
    import android.support.v4.app.Fragment;
    
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.ImageView;
    import android.widget.TextView;
    import android.widget.Toast;
    
    
    import com.example.myapplication.R;
    import com.example.myapplication.myCenter.nav_bar;
    
    import butterknife.BindView;
    import butterknife.ButterKnife;
    import butterknife.OnClick;
    import butterknife.Unbinder;
    import com.example.myapplication.isFuKuan;
    import  com.example.myapplication.myErweima;
    
    /**
     * @author:created By ZhangHao
     * 时间:2019/4/24 18
     * 邮箱:188660586@qq.com
     */
    public class MineFragment extends Fragment {
        @BindView(R.id.h_back)
        ImageView hBack;
    
        @BindView(R.id.h_head)
        ImageView hHead;
        @BindView(R.id.sex)
        nav_bar sex;
        @BindView(R.id.name)
        nav_bar name;
        @BindView(R.id.version)
        nav_bar version;
        @BindView(R.id.password)
        nav_bar password;
    
        private Unbinder bind;
    
        @Nullable
        @Override
        public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
            View view = inflater.inflate(R.layout.fragment_mine, container, false);
            bind = ButterKnife.bind(getActivity());
            nav_bar nav_bar = view.findViewById(R.id.Erweima);
    
            nav_bar.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Toast toast = Toast.makeText(getActivity(), "111", Toast.LENGTH_LONG);
                    toast.show();
                    isFuKuan ifk= (isFuKuan) getActivity().getApplication().getApplicationContext();
                    System.out.println("ifk:"+ifk);
                    if (ifk.getIfk()==true){
                        Intent intent = new Intent(getActivity(), myErweima.class);
                        startActivity(intent);
                    }else{
                        AlertDialog.Builder bulider=new AlertDialog.Builder(getActivity());
                     bulider.setIcon(R.drawable.msg1);
                     bulider.setTitle("温馨提示");
                     bulider.setMessage("请先选择乘车规划");
                     bulider.setPositiveButton("确定", new DialogInterface.OnClickListener() {
                         @Override
                         public void onClick(DialogInterface dialog, int which) {
                             dialog.dismiss();
    
                         }
                     });
    
                     bulider.create().show();
                    }
    
    
                }
            });
            return view;
        }
    
    
    
        @Override
        public void onDestroy() {
            super.onDestroy();
            bind.unbind();
        }
    }
  • 相关阅读:
    排序简介
    排序集锦
    排序图解
    UVA 11809
    uva1588kickdown
    C++中输入输出的重定向
    uva1587BOX
    uva 10340 All in All
    uva 1368 DNA Consensus String
    彻底理解MapReduce shuffle过程原理
  • 原文地址:https://www.cnblogs.com/chenyuchun/p/11066660.html
Copyright © 2011-2022 走看看