"我的"界面搭建完成
This commit is contained in:
@@ -6,14 +6,22 @@ import android.view.KeyEvent;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.base.BaseActivity;
|
||||
import com.example.myapplication.fragment.AboutFragment;
|
||||
import com.example.myapplication.fragment.CapacityEvaluationFragment;
|
||||
import com.example.myapplication.fragment.CapacityEvaluationFragment2;
|
||||
import com.example.myapplication.fragment.CapacityMeasurementFragment;
|
||||
import com.example.myapplication.fragment.ContactFragment;
|
||||
import com.example.myapplication.fragment.EventPrefectureFragment;
|
||||
import com.example.myapplication.fragment.FindFragment;
|
||||
import com.example.myapplication.fragment.ForgetPawFragment;
|
||||
import com.example.myapplication.fragment.GatheringFragment;
|
||||
import com.example.myapplication.fragment.GradeFragment;
|
||||
import com.example.myapplication.fragment.IssueFragment;
|
||||
import com.example.myapplication.fragment.MapDownloadFragment;
|
||||
import com.example.myapplication.fragment.MineFragment;
|
||||
import com.example.myapplication.fragment.PrivilegeFragment;
|
||||
import com.example.myapplication.fragment.RecordFragment;
|
||||
import com.example.myapplication.fragment.SetFragment;
|
||||
import com.example.myapplication.fragment.TaskExWebFragment;
|
||||
import com.example.myapplication.fragment.TaskExplainFragment;
|
||||
import com.example.myapplication.fragment.TaskExplainFragment2;
|
||||
@@ -21,6 +29,8 @@ import com.example.myapplication.fragment.TaskPrefectureFragment;
|
||||
|
||||
import com.example.myapplication.fragment.RegisterFragment;
|
||||
import com.example.myapplication.fragment.TreasureFragment;
|
||||
import com.example.myapplication.fragment.UserDataFragment;
|
||||
import com.example.myapplication.fragment.WithdrawFragment;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
|
||||
@@ -49,7 +59,16 @@ public class FragmentManagement extends BaseActivity {
|
||||
private CapacityEvaluationFragment2 capacityEvaluationFragment2;//发现-能力测评2的fragment -12
|
||||
private TaskExWebFragment taskExWebFragment;//发现-任务说明点击Item进入Web页面的fragment -13
|
||||
private CapacityMeasurementFragment capacityMeasurementFragment;//发现-能力测评item点击跳转web的fragment -14
|
||||
|
||||
private WithdrawFragment withdrawFragment;//我的-提现的fragment -15
|
||||
private UserDataFragment userDataFragment;//我的-用户资料的fragment -16
|
||||
private GradeFragment gradeFragment;//我的-我的等级的fragment -17
|
||||
private PrivilegeFragment privilegeFragment;//我的-我的特权的fragment -18
|
||||
private MapDownloadFragment mapDownloadFragment;//我的-地图下载的fragment -19
|
||||
private IssueFragment issueFragment;//我的-常见问题的fragment -20
|
||||
private ContactFragment contactFragment;//我的-联系我们的fragment -21
|
||||
private SetFragment setFragment;//我的-设置的fragment -22
|
||||
private AboutFragment aboutFragment;//我的-关于的fragment -23
|
||||
private GatheringFragment gatheringFragment;//我的-用户资料-收款信息的fragment -24
|
||||
|
||||
|
||||
@Override
|
||||
@@ -98,6 +117,27 @@ public class FragmentManagement extends BaseActivity {
|
||||
fragmentTransaction.hide(taskExWebFragment);
|
||||
if (capacityMeasurementFragment != null)//发现-能力测评item点击跳转web的fragment -14
|
||||
fragmentTransaction.hide(capacityMeasurementFragment);
|
||||
if (withdrawFragment != null)//我的-提现的fragment -15
|
||||
fragmentTransaction.hide(withdrawFragment);
|
||||
if (userDataFragment != null)//我的-用户资料的fragment -16
|
||||
fragmentTransaction.hide(userDataFragment);
|
||||
if (gradeFragment != null)//我的-我的等级的fragment -17
|
||||
fragmentTransaction.hide(gradeFragment);
|
||||
if (privilegeFragment != null)//我的-我的特权的fragment -18
|
||||
fragmentTransaction.hide(privilegeFragment);
|
||||
if (mapDownloadFragment != null)//我的-地图下载的fragment -19
|
||||
fragmentTransaction.hide(mapDownloadFragment);
|
||||
if (issueFragment != null)//我的-常见问题的fragment -20
|
||||
fragmentTransaction.hide(issueFragment);
|
||||
if (contactFragment != null)//我的-联系我们的fragment -21
|
||||
fragmentTransaction.hide(contactFragment);
|
||||
if (setFragment != null)//我的-设置的fragment -22
|
||||
fragmentTransaction.hide(setFragment);
|
||||
if (aboutFragment != null)//我的-关于的fragment -23
|
||||
fragmentTransaction.hide(aboutFragment);
|
||||
if (gatheringFragment != null)//我的-用户资料-收款信息的fragment -24
|
||||
fragmentTransaction.hide(gatheringFragment);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -220,6 +260,86 @@ public class FragmentManagement extends BaseActivity {
|
||||
fragmentTransaction.show(capacityMeasurementFragment);
|
||||
}
|
||||
break;
|
||||
case 15://我的-提现的fragment
|
||||
if (withdrawFragment == null) {
|
||||
withdrawFragment = new WithdrawFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout, withdrawFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(withdrawFragment);
|
||||
}
|
||||
break;
|
||||
case 16://我的-用户资料的fragment
|
||||
if (userDataFragment == null) {
|
||||
userDataFragment = new UserDataFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout, userDataFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(userDataFragment);
|
||||
}
|
||||
break;
|
||||
case 17://我的-我的等级的fragment
|
||||
if (gradeFragment == null) {
|
||||
gradeFragment = new GradeFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout, gradeFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(gradeFragment);
|
||||
}
|
||||
break;
|
||||
case 18://我的-我的特权的fragment
|
||||
if (privilegeFragment == null) {
|
||||
privilegeFragment = new PrivilegeFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout, privilegeFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(privilegeFragment);
|
||||
}
|
||||
break;
|
||||
case 19://我的-地图下载的fragment
|
||||
if (mapDownloadFragment == null) {
|
||||
mapDownloadFragment = new MapDownloadFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout, mapDownloadFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(mapDownloadFragment);
|
||||
}
|
||||
break;
|
||||
case 20://我的-常见问题的fragment
|
||||
if (issueFragment == null) {
|
||||
issueFragment = new IssueFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout, issueFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(issueFragment);
|
||||
}
|
||||
break;
|
||||
case 21://我的-联系我们的fragment
|
||||
if (contactFragment == null) {
|
||||
contactFragment = new ContactFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout, contactFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(contactFragment);
|
||||
}
|
||||
break;
|
||||
case 22://我的-设置的fragment
|
||||
if (setFragment == null) {
|
||||
setFragment = new SetFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout, setFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(setFragment);
|
||||
}
|
||||
break;
|
||||
case 23://我的-关于的fragment
|
||||
if (aboutFragment == null) {
|
||||
aboutFragment = new AboutFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout, aboutFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(aboutFragment);
|
||||
}
|
||||
break;
|
||||
case 24://我的-用户资料-收款信息的fragment
|
||||
if (gatheringFragment == null) {
|
||||
gatheringFragment = new GatheringFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout, gatheringFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(gatheringFragment);
|
||||
}
|
||||
break;
|
||||
}
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
@@ -253,7 +373,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
taskExplainFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 9:
|
||||
eventPrefectureFragment.onActivityResult(requestCode,resultCode,data);
|
||||
eventPrefectureFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 10:
|
||||
taskExplainFragment2.onActivityResult(requestCode, resultCode, data);
|
||||
@@ -261,15 +381,44 @@ public class FragmentManagement extends BaseActivity {
|
||||
case 11:
|
||||
capacityEvaluationFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 12:
|
||||
case 12:
|
||||
capacityEvaluationFragment2.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
taskExWebFragment.onActivityResult(requestCode, resultCode, data);
|
||||
case 13:
|
||||
taskExWebFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 14:
|
||||
capacityMeasurementFragment.onActivityResult(requestCode, resultCode, data);
|
||||
case 14:
|
||||
capacityMeasurementFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 15:
|
||||
withdrawFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 16:
|
||||
userDataFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 17:
|
||||
gradeFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 18:
|
||||
privilegeFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 19:
|
||||
mapDownloadFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 20:
|
||||
issueFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 21:
|
||||
contactFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 22:
|
||||
setFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 23:
|
||||
aboutFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 24:
|
||||
gatheringFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -48,13 +48,6 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
|
||||
char A = 65;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
String title = "选项"+(A++);
|
||||
System.out.println(title);
|
||||
}
|
||||
|
||||
ImmersionBar.with(this)
|
||||
.statusBarDarkFont(true, 0.2f)
|
||||
//原理:如果当前设备支持状态栏字体变色,会设置状态栏字体为黑色,如果当前设备不支持状态栏字体变色,会使当前状态栏加上透明度,否则不执行透明度
|
||||
|
||||
@@ -95,9 +95,6 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
checkedChangeRadioButton(parentLayout, buttonView);
|
||||
|
||||
Toast.makeText(context, "option" + option, Toast.LENGTH_SHORT).show();
|
||||
|
||||
updateCheckedMap(questionId, buttonView, parentLayout);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
|
||||
/**
|
||||
* 关于页面的fragment
|
||||
*/
|
||||
public class AboutFragment extends BaseFragment {
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.about_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -54,14 +54,13 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ivMeasurementFinish = (ImageView) findViewById(R.id.iv_measurement_finish);
|
||||
btn = findViewById(R.id.btn);
|
||||
btn.setOnClickListener(this::onClick);
|
||||
capacityMeasurementRel = (RecyclerView) findViewById(R.id.capacity_measurementRel);
|
||||
ivMeasurementFinish.setOnClickListener(this::onClick);
|
||||
capacityMeasurementRel.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
capacityMeasureAdapter = new CapacityMeasureAdapter(getActivity());
|
||||
capacityMeasurementRel.setAdapter(capacityMeasureAdapter);
|
||||
|
||||
btn = findViewById(R.id.btn);
|
||||
btn.setOnClickListener(this::onClick);
|
||||
|
||||
}
|
||||
|
||||
@@ -70,7 +69,6 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
super.initData();
|
||||
bolbean = new ArrayList<>();
|
||||
examBeans = new ArrayList<>();
|
||||
|
||||
initNetWorks(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
|
||||
/**
|
||||
* 联系我们的Fragment
|
||||
*/
|
||||
public class ContactFragment extends BaseFragment {
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.contact_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
|
||||
/**
|
||||
* 收款信息
|
||||
*/
|
||||
public class GatheringFragment extends BaseFragment {
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.gathering_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
|
||||
/**
|
||||
* 我的等级页面的fragment
|
||||
*/
|
||||
public class GradeFragment extends BaseFragment {
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.grade_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
|
||||
/**
|
||||
* 常见问题页面的fragment
|
||||
*/
|
||||
public class IssueFragment extends BaseFragment {
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.issue_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
|
||||
/**
|
||||
* 地图下载的Fragment
|
||||
*/
|
||||
public class MapDownloadFragment extends BaseFragment {
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.map_download_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.activity.FragmentManagement;
|
||||
import com.example.myapplication.activity.LoginActivity;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
@@ -8,7 +18,13 @@ import com.gyf.immersionbar.ImmersionBar;
|
||||
* 我的Fragment
|
||||
* 2021-5-25
|
||||
*/
|
||||
public class MineFragment extends BaseFragment {
|
||||
public class MineFragment extends BaseFragment implements View.OnClickListener{
|
||||
|
||||
private ImageView imageHeard ,imageShare, imageSign;
|
||||
private TextView tvName, tvMoney;
|
||||
private Button btnWithdraw,btnQuit;
|
||||
private RelativeLayout rlGrade, rlPrivilege, rlMap, rlIssue, rlContact, rlSet, rlAbout;
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.mine_fragment;
|
||||
@@ -17,10 +33,109 @@ public class MineFragment extends BaseFragment {
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
imageHeard = findViewById(R.id.image_heard);
|
||||
imageHeard.setOnClickListener(this::onClick);
|
||||
tvName = findViewById(R.id.tv_name);
|
||||
tvName.setOnClickListener(this::onClick);
|
||||
tvMoney = findViewById(R.id.tv_money);
|
||||
imageShare = findViewById(R.id.image_share);
|
||||
imageShare.setOnClickListener(this::onClick);
|
||||
imageSign = findViewById(R.id.image_sign);
|
||||
imageSign.setOnClickListener(this::onClick);
|
||||
btnWithdraw = findViewById(R.id.btn_withdraw);
|
||||
btnWithdraw.setOnClickListener(this::onClick);
|
||||
rlGrade = findViewById(R.id.rl_grade);
|
||||
rlGrade.setOnClickListener(this::onClick);
|
||||
rlPrivilege = findViewById(R.id.rl_privilege);
|
||||
rlPrivilege.setOnClickListener(this::onClick);
|
||||
rlMap = findViewById(R.id.rl_map);
|
||||
rlMap.setOnClickListener(this::onClick);
|
||||
rlIssue = findViewById(R.id.rl_issue);
|
||||
rlIssue.setOnClickListener(this::onClick);
|
||||
rlContact = findViewById(R.id.rl_contact);
|
||||
rlContact.setOnClickListener(this::onClick);
|
||||
rlSet = findViewById(R.id.rl_set);
|
||||
rlSet.setOnClickListener(this::onClick);
|
||||
rlAbout = findViewById(R.id.rl_about);
|
||||
rlAbout.setOnClickListener(this::onClick);
|
||||
btnQuit = findViewById(R.id.btn_quit);
|
||||
btnQuit.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
case R.id.image_heard:
|
||||
case R.id.tv_name:
|
||||
//跳转到个人信息
|
||||
Intent intentUser = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentUser.putExtra("tag",16);
|
||||
startActivity(intentUser);
|
||||
break;
|
||||
case R.id.image_share://分享
|
||||
break;
|
||||
case R.id.image_sign://签到
|
||||
break;
|
||||
case R.id.btn_withdraw:
|
||||
//提现页面
|
||||
Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentWithdraw.putExtra("tag",15);
|
||||
startActivity(intentWithdraw);
|
||||
break;
|
||||
case R.id.rl_grade:
|
||||
//我的等级
|
||||
Intent intentGrade = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentGrade.putExtra("tag",17);
|
||||
startActivity(intentGrade);
|
||||
break;
|
||||
case R.id.rl_privilege:
|
||||
//我的特权
|
||||
Intent intentPrivilege = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentPrivilege.putExtra("tag",18);
|
||||
startActivity(intentPrivilege);
|
||||
break;
|
||||
case R.id.rl_map:
|
||||
//地图下载
|
||||
Intent intentMap = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentMap.putExtra("tag",19);
|
||||
startActivity(intentMap);
|
||||
break;
|
||||
case R.id.rl_issue:
|
||||
//常见问题
|
||||
Intent intentIssue = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentIssue.putExtra("tag",20);
|
||||
startActivity(intentIssue);
|
||||
break;
|
||||
case R.id.rl_contact:
|
||||
//联系我们
|
||||
Intent intentContact = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentContact.putExtra("tag",21);
|
||||
startActivity(intentContact);
|
||||
break;
|
||||
case R.id.rl_set:
|
||||
//设置
|
||||
Intent intentSet = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentSet.putExtra("tag",22);
|
||||
startActivity(intentSet);
|
||||
break;
|
||||
case R.id.rl_about:
|
||||
//关于
|
||||
Intent intentAbout = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentAbout.putExtra("tag",23);
|
||||
startActivity(intentAbout);
|
||||
break;
|
||||
case R.id.btn_quit:
|
||||
//退出登录
|
||||
getActivity().finish();
|
||||
break;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
|
||||
/**
|
||||
* 我的等级页面的fragment
|
||||
*/
|
||||
public class PrivilegeFragment extends BaseFragment {
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.privilege_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
|
||||
/**
|
||||
* 设置页面的fragment
|
||||
*/
|
||||
public class SetFragment extends BaseFragment {
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.set_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
}
|
||||
}
|
||||
@@ -98,8 +98,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
public void onSuccess(TaskExplainInfo response, int id) {
|
||||
dismissLoadingDialog();
|
||||
taskExplainAdapter.setExplainList(response.getBody().getData());
|
||||
Log.d("TAG", "onSuccess: " + response.getMsg() + "sssssssssssss");
|
||||
Toast.makeText(getActivity(), response.getMsg() + "", Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onSuccess: " + response.getMsg() + "");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.activity.FragmentManagement;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
||||
/**
|
||||
* 用户资料的fragment
|
||||
*/
|
||||
public class UserDataFragment extends BaseFragment implements View.OnClickListener{
|
||||
|
||||
private Button btnGathering;
|
||||
private Button btnAttestation;
|
||||
private ImageView imageView;
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.user_data_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
btnAttestation = findViewById(R.id.btn_attestation);
|
||||
btnAttestation.setOnClickListener(this::onClick);
|
||||
btnGathering = findViewById(R.id.btn_gathering);
|
||||
btnGathering.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
case R.id.btn_gathering:
|
||||
|
||||
Intent gatheringIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
gatheringIntent.putExtra("tag",24);
|
||||
startActivity(gatheringIntent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (resultCode==RESULT_OK){
|
||||
Bundle extras=data.getExtras();//从Intent中获取附加值
|
||||
Bitmap bitmap=(Bitmap) extras.get("data");//从附加值中获取返回的图像
|
||||
imageView.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.example.myapplication.fragment;
|
||||
|
||||
import com.example.myapplication.R;
|
||||
import com.example.myapplication.base.BaseFragment;
|
||||
|
||||
/**
|
||||
* 提现页面的fragment
|
||||
*/
|
||||
public class WithdrawFragment extends BaseFragment {
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.withdraw_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user