-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSecondFragment.java
More file actions
41 lines (34 loc) · 1.1 KB
/
Copy pathSecondFragment.java
File metadata and controls
41 lines (34 loc) · 1.1 KB
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
package com.miaoyi.work.fragment;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.miaoyi.work.R;
/**
* Created by administrato on 2016/8/23.
*/
public class SecondFragment extends BaseFragment {
public static SecondFragment newInstance() {
return new SecondFragment();
}
@Override
protected void initView(View view, Bundle savedInstanceState) {
Button button = (Button) view.findViewById(R.id.btn_add_Fragment);
/* ImageView img = (ImageView) view.findViewById(R.id.back);
img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
removeFragment();
}
});*/
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
addFragment(ThirdFragment.newInstance(), "第三个");
}
});
}
@Override
protected int getLayoutId() {
return R.layout.fragment_second;
}
}