endian11
2020-09-15 389853ce971a3da0e806dddd909bb43f5928c90c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package safeluck.drive.evaluation.fragment.shop;
 
 
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
 
import androidx.annotation.Nullable;
 
import me.yokeyword.fragmentation.SupportFragment;
import me.yokeyword.fragmentation.anim.DefaultNoAnimator;
import me.yokeyword.fragmentation.anim.FragmentAnimator;
import safeluck.drive.evaluation.R;
 
/**
 * Created by YoKeyword on 16/2/9.
 */
public class ContentFragment extends SupportFragment {
    private static final String ARG_MENU = "arg_menu";
 
    private TextView mTvContent;
    private Button mBtnNext;
 
    private String mMenu;
 
    public static ContentFragment newInstance(String menu) {
 
        Bundle args = new Bundle();
        args.putString(ARG_MENU, menu);
 
        ContentFragment fragment = new ContentFragment();
        fragment.setArguments(args);
        return fragment;
    }
 
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
 
        Bundle args = getArguments();
        if (args != null) {
            mMenu = args.getString(ARG_MENU);
        }
        switch (mMenu){
            case "档位相关设置":
                break;
            case "常用参数设置":
                break;
            case "通用评判设置":
                break;
            case "上车起步设置":
                break;
        }
    }
 
    @Override
    public FragmentAnimator onCreateFragmentAnimator() {
        return new DefaultNoAnimator();
    }
 
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_content, container, false);
        initView(view);
        return view;
    }
 
    private void initView(View view) {
//        mTvContent = (TextView) view.findViewById(R.id.tv_content);
 
 
    }
 
    @Override
    public boolean onBackPressedSupport() {
        // ContentFragment是ShopFragment的栈顶子Fragment,可以在此处理返回按键事件
        return super.onBackPressedSupport();
    }
}