筛选页面数据展示
This commit is contained in:
parent
d13d1628c8
commit
6b17e85f27
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.0"
|
||||
ndkVersion '23.0.7123448'
|
||||
//ndkVersion '23.0.7123448'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.base.BaseActivity;
|
||||
@ -82,7 +83,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
private StaySubmitFragment staySubmitFragment;//记录-待提交的fragment -29
|
||||
private HasSubmitFragment hasSubmitFragment;//记录-已提交的fragment -30
|
||||
private PoiTaskFragment poiTaskFragment;//记录-已提交-POI任务列表的fragment -31
|
||||
private FilterFragment filterFragment;//寻宝-删选 -35
|
||||
private FilterFragment filterFragment;//寻宝-筛选界面 -32
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
@ -132,7 +133,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
fragmentTransaction.hide(capacityMeasurementFragment);
|
||||
if (withdrawFragment != null)//我的-提现的fragment -15
|
||||
fragmentTransaction.hide(withdrawFragment);
|
||||
if (issueWebFragment!=null)//我的-常见问题-web的fragment -27
|
||||
if (issueWebFragment != null)//我的-常见问题-web的fragment -27
|
||||
fragmentTransaction.hide(issueWebFragment);
|
||||
if (gradeFragment != null)//我的-我的等级的fragment -17
|
||||
fragmentTransaction.hide(gradeFragment);
|
||||
@ -150,25 +151,24 @@ public class FragmentManagement extends BaseActivity {
|
||||
fragmentTransaction.hide(aboutFragment);
|
||||
if (gatheringFragment != null)//我的-用户资料-收款信息的fragment -24
|
||||
fragmentTransaction.hide(gatheringFragment);
|
||||
if (userAttestationFragment!=null)//我的-用户资料-实名认证的fragment-25
|
||||
if (userAttestationFragment != null)//我的-用户资料-实名认证的fragment-25
|
||||
fragmentTransaction.hide(userAttestationFragment);
|
||||
if (withdrawalRecordFragment!=null)//我的-提现-提现记录的fragment -26
|
||||
if (withdrawalRecordFragment != null)//我的-提现-提现记录的fragment -26
|
||||
fragmentTransaction.hide(withdrawalRecordFragment);
|
||||
if (poiFragment !=null) //寻宝-上传-POI的fragment -27
|
||||
if (poiFragment != null) //寻宝-上传-POI的fragment -27
|
||||
fragmentTransaction.hide(poiFragment);
|
||||
if (roadFragment !=null) //寻宝-上传-道路的fragment -28
|
||||
if (roadFragment != null) //寻宝-上传-道路的fragment -28
|
||||
fragmentTransaction.hide(roadFragment);
|
||||
if (staySubmitFragment !=null) //记录-待提交的fragment -29
|
||||
if (staySubmitFragment != null) //记录-待提交的fragment -29
|
||||
fragmentTransaction.hide(staySubmitFragment);
|
||||
if (hasSubmitFragment !=null) //记录-已提交的fragment -30
|
||||
if (hasSubmitFragment != null) //记录-已提交的fragment -30
|
||||
fragmentTransaction.hide(hasSubmitFragment);
|
||||
if (poiTaskFragment !=null) //记录-已提交-任务列表的fragment -31
|
||||
if (poiTaskFragment != null) //记录-已提交-任务列表的fragment -31
|
||||
fragmentTransaction.hide(poiTaskFragment);
|
||||
if (filterFragment!=null)//寻宝-删选
|
||||
if (filterFragment != null)//寻宝-删选
|
||||
fragmentTransaction.hide(filterFragment);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void selectorFragment(int i) {
|
||||
@ -177,7 +177,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
switch (i) {
|
||||
case 1://我的fragment
|
||||
if (mineFragment == null) {
|
||||
mineFragment = new MineFragment();
|
||||
mineFragment = MineFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, mineFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(mineFragment);
|
||||
@ -188,7 +188,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 2://发现的fragment
|
||||
if (findFragment == null) {
|
||||
findFragment = new FindFragment();
|
||||
findFragment =FindFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, findFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(findFragment);
|
||||
@ -196,7 +196,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 3://纪录的fragment
|
||||
if (recordFragment == null) {
|
||||
recordFragment = new RecordFragment();
|
||||
recordFragment = RecordFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, recordFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(recordFragment);
|
||||
@ -204,7 +204,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 4://寻宝的fragment
|
||||
if (treasureFragment == null) {
|
||||
treasureFragment = new TreasureFragment();
|
||||
treasureFragment =TreasureFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, treasureFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(treasureFragment);
|
||||
@ -212,7 +212,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 5://注册的fragment
|
||||
if (registerFragment == null) {
|
||||
registerFragment = new RegisterFragment();
|
||||
registerFragment =RegisterFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, registerFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(registerFragment);
|
||||
@ -220,7 +220,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 6://忘记密码fragment
|
||||
if (forgetPawFragment == null) {
|
||||
forgetPawFragment = new ForgetPawFragment();
|
||||
forgetPawFragment =ForgetPawFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, forgetPawFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(forgetPawFragment);
|
||||
@ -228,7 +228,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 7://发现-任务专区的fragment
|
||||
if (taskPrefectureFragment == null) {
|
||||
taskPrefectureFragment = new TaskPrefectureFragment();
|
||||
taskPrefectureFragment =TaskPrefectureFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, taskPrefectureFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(taskPrefectureFragment);
|
||||
@ -236,7 +236,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 8: //发现 - 任务说明的fragment
|
||||
if (taskExplainFragment == null) {
|
||||
taskExplainFragment = new TaskExplainFragment();
|
||||
taskExplainFragment = TaskExplainFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, taskExplainFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(taskExplainFragment);
|
||||
@ -244,7 +244,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 9://发现-活动专区的fragment
|
||||
if (eventPrefectureFragment == null) {
|
||||
eventPrefectureFragment = new EventPrefectureFragment();
|
||||
eventPrefectureFragment =EventPrefectureFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, eventPrefectureFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(eventPrefectureFragment);
|
||||
@ -252,7 +252,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 10://发现-任务说明点击Item进入fragment
|
||||
if (taskExplainFragment2 == null) {
|
||||
taskExplainFragment2 = new TaskExplainFragment2();
|
||||
taskExplainFragment2 =TaskExplainFragment2.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, taskExplainFragment2);
|
||||
} else {
|
||||
fragmentTransaction.show(taskExplainFragment2);
|
||||
@ -260,7 +260,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 11://发现-能力测评fragment -
|
||||
if (capacityEvaluationFragment == null) {
|
||||
capacityEvaluationFragment = new CapacityEvaluationFragment();
|
||||
capacityEvaluationFragment = CapacityEvaluationFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, capacityEvaluationFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(capacityEvaluationFragment);
|
||||
@ -268,7 +268,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 12://发现-能力测评2的fragment -
|
||||
if (capacityEvaluationFragment2 == null) {
|
||||
capacityEvaluationFragment2 = new CapacityEvaluationFragment2();
|
||||
capacityEvaluationFragment2 =CapacityEvaluationFragment2.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, capacityEvaluationFragment2);
|
||||
} else {
|
||||
fragmentTransaction.show(capacityEvaluationFragment2);
|
||||
@ -276,7 +276,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 13://发现-任务说明点击Item进入Web页面的fragment
|
||||
if (taskExWebFragment == null) {
|
||||
taskExWebFragment = new TaskExWebFragment();
|
||||
taskExWebFragment =TaskExWebFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, taskExWebFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(taskExWebFragment);
|
||||
@ -284,7 +284,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 14://发现-能力测评item点击跳转测试的fragment
|
||||
if (capacityMeasurementFragment == null) {
|
||||
capacityMeasurementFragment = new CapacityMeasurementFragment();
|
||||
capacityMeasurementFragment = CapacityMeasurementFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, capacityMeasurementFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(capacityMeasurementFragment);
|
||||
@ -292,7 +292,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 15://我的-提现的fragment
|
||||
if (withdrawFragment == null) {
|
||||
withdrawFragment = new WithdrawFragment();
|
||||
withdrawFragment = WithdrawFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, withdrawFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(withdrawFragment);
|
||||
@ -300,7 +300,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 16://我的-常见问题-web的fragment
|
||||
if (issueWebFragment == null) {
|
||||
issueWebFragment = new IssueWebFragment();
|
||||
issueWebFragment = IssueWebFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, issueWebFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(issueWebFragment);
|
||||
@ -308,7 +308,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 17://我的-我的等级的fragment
|
||||
if (gradeFragment == null) {
|
||||
gradeFragment = new GradeFragment();
|
||||
gradeFragment = GradeFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, gradeFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(gradeFragment);
|
||||
@ -316,7 +316,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 18://我的-我的特权的fragment
|
||||
if (privilegeFragment == null) {
|
||||
privilegeFragment = new PrivilegeFragment();
|
||||
privilegeFragment = PrivilegeFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, privilegeFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(privilegeFragment);
|
||||
@ -324,7 +324,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 19://我的-地图下载的fragment
|
||||
if (mapDownloadFragment == null) {
|
||||
mapDownloadFragment = new MapDownloadFragment();
|
||||
mapDownloadFragment = MapDownloadFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, mapDownloadFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(mapDownloadFragment);
|
||||
@ -332,7 +332,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 20://我的-常见问题的fragment
|
||||
if (issueFragment == null) {
|
||||
issueFragment = new IssueFragment();
|
||||
issueFragment =IssueFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, issueFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(issueFragment);
|
||||
@ -340,7 +340,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 21://我的-联系我们的fragment
|
||||
if (contactFragment == null) {
|
||||
contactFragment = new ContactFragment();
|
||||
contactFragment =ContactFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, contactFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(contactFragment);
|
||||
@ -348,7 +348,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 22://我的-设置的fragment
|
||||
if (setFragment == null) {
|
||||
setFragment = new SetFragment();
|
||||
setFragment = SetFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, setFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(setFragment);
|
||||
@ -356,7 +356,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 23://我的-关于的fragment
|
||||
if (aboutFragment == null) {
|
||||
aboutFragment = new AboutFragment();
|
||||
aboutFragment = AboutFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, aboutFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(aboutFragment);
|
||||
@ -364,7 +364,7 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 24://我的-用户资料-收款信息的fragment
|
||||
if (gatheringFragment == null) {
|
||||
gatheringFragment = new GatheringFragment();
|
||||
gatheringFragment = GatheringFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, gatheringFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(gatheringFragment);
|
||||
@ -372,65 +372,65 @@ public class FragmentManagement extends BaseActivity {
|
||||
break;
|
||||
case 25://我的-用户资料-实名认证的fragment
|
||||
if (userAttestationFragment == null) {
|
||||
userAttestationFragment = new UserAttestationFragment();
|
||||
userAttestationFragment = UserAttestationFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, userAttestationFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(userAttestationFragment);
|
||||
}
|
||||
break;
|
||||
case 26://我的-提现-提现记录的fragment
|
||||
if (withdrawalRecordFragment ==null){
|
||||
withdrawalRecordFragment=new WithdrawalRecordFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout,withdrawalRecordFragment);
|
||||
}else {
|
||||
if (withdrawalRecordFragment == null) {
|
||||
withdrawalRecordFragment =WithdrawalRecordFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, withdrawalRecordFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(withdrawalRecordFragment);
|
||||
}
|
||||
break;
|
||||
case 27://寻宝-上传-POI的fragment -
|
||||
if (poiFragment ==null){
|
||||
poiFragment=new PoiFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout,poiFragment);
|
||||
}else {
|
||||
if (poiFragment == null) {
|
||||
poiFragment = PoiFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, poiFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(poiFragment);
|
||||
}
|
||||
break;
|
||||
case 28://寻宝-上传-道路的fragment
|
||||
if (roadFragment ==null){
|
||||
roadFragment =new RoadFragment();
|
||||
if (roadFragment == null) {
|
||||
roadFragment =RoadFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, roadFragment);
|
||||
}else {
|
||||
} else {
|
||||
fragmentTransaction.show(roadFragment);
|
||||
}
|
||||
break;
|
||||
case 29:////记录-待提交的fragment -29
|
||||
if (staySubmitFragment ==null){
|
||||
staySubmitFragment =new StaySubmitFragment();
|
||||
if (staySubmitFragment == null) {
|
||||
staySubmitFragment = StaySubmitFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, staySubmitFragment);
|
||||
}else {
|
||||
} else {
|
||||
fragmentTransaction.show(staySubmitFragment);
|
||||
}
|
||||
break;
|
||||
case 30://记录-已提交的fragment
|
||||
if (hasSubmitFragment ==null){
|
||||
hasSubmitFragment =new HasSubmitFragment();
|
||||
if (hasSubmitFragment == null) {
|
||||
hasSubmitFragment = HasSubmitFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, hasSubmitFragment);
|
||||
}else {
|
||||
} else {
|
||||
fragmentTransaction.show(hasSubmitFragment);
|
||||
}
|
||||
break;
|
||||
case 31://记录-已提交-任务列表的fragment
|
||||
if (poiTaskFragment ==null){
|
||||
poiTaskFragment =new PoiTaskFragment();
|
||||
if (poiTaskFragment == null) {
|
||||
poiTaskFragment =PoiTaskFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, poiTaskFragment);
|
||||
}else {
|
||||
} else {
|
||||
fragmentTransaction.show(poiTaskFragment);
|
||||
}
|
||||
break;
|
||||
case 35://寻宝- 删选
|
||||
if (filterFragment ==null){
|
||||
filterFragment =new FilterFragment();
|
||||
fragmentTransaction.add(R.id.frame_layout,filterFragment);
|
||||
}else {
|
||||
case 32://寻宝- 删选
|
||||
if (filterFragment == null) {
|
||||
filterFragment = FilterFragment.newInstance(new Bundle());
|
||||
fragmentTransaction.add(R.id.frame_layout, filterFragment);
|
||||
} else {
|
||||
fragmentTransaction.show(filterFragment);
|
||||
}
|
||||
break;
|
||||
@ -438,106 +438,6 @@ public class FragmentManagement extends BaseActivity {
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
switch (fourthly_tag) {
|
||||
case 1:
|
||||
mineFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 2:
|
||||
findFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 3:
|
||||
recordFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 4:
|
||||
treasureFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 5:
|
||||
registerFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 6:
|
||||
forgetPawFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 7:
|
||||
taskPrefectureFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 8:
|
||||
taskExplainFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 9:
|
||||
eventPrefectureFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 10:
|
||||
taskExplainFragment2.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 11:
|
||||
capacityEvaluationFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 12:
|
||||
capacityEvaluationFragment2.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 13:
|
||||
taskExWebFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 14:
|
||||
capacityMeasurementFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 15:
|
||||
withdrawFragment.onActivityResult(requestCode, resultCode, data);
|
||||
break;
|
||||
case 16:
|
||||
issueWebFragment.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;
|
||||
case 25:
|
||||
userAttestationFragment.onActivityResult(requestCode,resultCode,data);
|
||||
break;
|
||||
case 26:
|
||||
withdrawalRecordFragment.onActivityResult(requestCode,resultCode,data);
|
||||
break;
|
||||
case 27:
|
||||
poiFragment.onActivityResult(requestCode,resultCode,data);
|
||||
break;
|
||||
case 28:
|
||||
roadFragment.onActivityResult(requestCode,resultCode,data);
|
||||
break;
|
||||
case 29:
|
||||
staySubmitFragment.onActivityResult(requestCode,resultCode,data);
|
||||
break;
|
||||
case 30:
|
||||
hasSubmitFragment.onActivityResult(requestCode,resultCode,data);
|
||||
break;
|
||||
case 35:
|
||||
filterFragment.onActivityResult(requestCode,resultCode,data);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void setZtlTextColor() {
|
||||
ImmersionBar.with(this).statusBarDarkFont(true, 0.2f)
|
||||
|
@ -59,6 +59,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
case R.id.btn_login:
|
||||
Intent intent = new Intent(this, HomeActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,6 @@ public class MainActivity extends BaseActivity {
|
||||
public void onFinish() {
|
||||
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
@ -53,6 +53,13 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.ViewHolder
|
||||
}
|
||||
}
|
||||
});
|
||||
if (poiEntity.getTaskStatus()==0){
|
||||
holder.tvGit.setVisibility(View.VISIBLE);
|
||||
holder.tvSubmit.setVisibility(View.GONE);
|
||||
}else if (poiEntity.getTaskStatus()==1){
|
||||
holder.tvSubmit.setVisibility(View.VISIBLE);
|
||||
holder.tvGit.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -62,7 +69,7 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.ViewHolder
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvName,tvForm,tvTaskId,tvMoney,tvDistance;
|
||||
TextView tvName,tvForm,tvTaskId,tvMoney,tvDistance,tvGit,tvSubmit;
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
tvName=itemView.findViewById(R.id.tv_name);
|
||||
@ -70,6 +77,8 @@ public class FilterAdapter extends RecyclerView.Adapter<FilterAdapter.ViewHolder
|
||||
tvTaskId=itemView.findViewById(R.id.tv_task_id);
|
||||
tvMoney=itemView.findViewById(R.id.tv_money);
|
||||
tvDistance=itemView.findViewById(R.id.tv_distance);
|
||||
tvGit=itemView.findViewById(R.id.tv_git);
|
||||
tvSubmit=itemView.findViewById(R.id.tv_submit);
|
||||
}
|
||||
}
|
||||
ItemCLick itemCLick;
|
||||
|
@ -7,7 +7,10 @@ import com.navinfo.outdoor.util.FragmentBackHandler;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
public abstract class BaseDialogFragment extends BaseFragment {
|
||||
/**
|
||||
* 管理寻宝页面的抽屉中的fragment
|
||||
*/
|
||||
public abstract class BaseDrawerFragment extends BaseFragment {
|
||||
@Override
|
||||
public void initEvent() {
|
||||
super.initEvent();
|
||||
@ -18,6 +21,11 @@ public abstract class BaseDialogFragment extends BaseFragment {
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBackPressed() {
|
||||
getActivity().getSupportFragmentManager().popBackStack();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
@ -44,8 +44,7 @@ public abstract class BaseFragment extends Fragment implements FragmentBackHandl
|
||||
|
||||
@Override
|
||||
public boolean onBackPressed() {
|
||||
getActivity().getSupportFragmentManager().popBackStack();
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void initEvent(){}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
@ -18,6 +19,11 @@ public class AboutFragment extends BaseFragment implements View.OnClickListener
|
||||
private RelativeLayout rlServe;
|
||||
private RelativeLayout rlPrivilege;
|
||||
|
||||
public static AboutFragment newInstance(Bundle bundle) {
|
||||
AboutFragment fragment = new AboutFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.about_fragment;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@ -38,6 +39,11 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
private CapacityEvaluationAdapter capacityEvaluationAdapter;
|
||||
private ArrayList<TaskExplainInfo.BodyBean.DataBean> capacityList;
|
||||
|
||||
public static CapacityEvaluationFragment newInstance(Bundle bundle) {
|
||||
CapacityEvaluationFragment fragment = new CapacityEvaluationFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_capacity_evaluation;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@ -33,6 +34,11 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
||||
private CapacityItemAdapter capacityItemAdapter;
|
||||
private ArrayList<TaskExplainInfo.BodyBean.DataBean> capItemList;
|
||||
|
||||
public static CapacityEvaluationFragment2 newInstance(Bundle bundle) {
|
||||
CapacityEvaluationFragment2 fragment = new CapacityEvaluationFragment2();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_capacity_evaluation2;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@ -43,6 +44,12 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
private Button btn;
|
||||
private ArrayList<ExamBean> examBeans;
|
||||
|
||||
public static CapacityMeasurementFragment newInstance(Bundle bundle) {
|
||||
CapacityMeasurementFragment fragment = new CapacityMeasurementFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_capacity_eva_web;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
@ -31,6 +32,11 @@ public class ContactFragment extends BaseFragment implements View.OnClickListene
|
||||
"</div>";
|
||||
private WebView nWebView;
|
||||
|
||||
public static ContactFragment newInstance(Bundle bundle) {
|
||||
ContactFragment fragment = new ContactFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.contact_fragment;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@ -36,6 +37,11 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
private EventPrefectureAdapter eventPrefectureAdapter;
|
||||
private int page = 1;
|
||||
|
||||
public static EventPrefectureFragment newInstance(Bundle bundle) {
|
||||
EventPrefectureFragment fragment = new EventPrefectureFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.event_prefecture_fragment;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -19,7 +20,7 @@ import com.kongzue.dialog.v3.BottomMenu;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.adapter.FilterAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDialogFragment;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.room.PoiDao;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
@ -29,7 +30,7 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FilterFragment extends BaseDialogFragment implements View.OnClickListener {
|
||||
public class FilterFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||
private ImageView ivFilter;
|
||||
private Button btnFilter;
|
||||
private XRecyclerView recyclerFilter;
|
||||
@ -39,8 +40,16 @@ public class FilterFragment extends BaseDialogFragment implements View.OnClickLi
|
||||
private PoiDao poiDao;
|
||||
private FilterAdapter filterAdapter;
|
||||
private ArrayList<PoiEntity> poiEntities;
|
||||
private TextView tvTitle;
|
||||
|
||||
|
||||
|
||||
public static FilterFragment newInstance(Bundle bundle) {
|
||||
FilterFragment fragment = new FilterFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_filter;
|
||||
@ -59,7 +68,8 @@ public class FilterFragment extends BaseDialogFragment implements View.OnClickLi
|
||||
clType.setOnClickListener(this::onClick);
|
||||
tvType = findViewById(R.id.tv_type);
|
||||
|
||||
//recyclerView
|
||||
tvTitle = findViewById(R.id.tv_title);
|
||||
tvTitle.setOnClickListener(this::onClick);
|
||||
btnFilter = findViewById(R.id.btn_filter);
|
||||
btnFilter.setOnClickListener(this::onClick);
|
||||
ivFilter = findViewById(R.id.iv_filter);
|
||||
@ -123,6 +133,14 @@ public class FilterFragment extends BaseDialogFragment implements View.OnClickLi
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.tv_title:
|
||||
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"200", "500","1000"}, new OnMenuItemClickListener() {
|
||||
@Override
|
||||
public void onClick(String text, int index) {
|
||||
tvTitle.setText("共"+text+"条");
|
||||
}
|
||||
});
|
||||
break;
|
||||
case R.id.btn_filter:
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.FILTER_LIST;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
@ -21,7 +22,11 @@ public class FindFragment extends BaseFragment implements View.OnClickListener{
|
||||
private LinearLayout linearEnd;
|
||||
private LinearLayout linear_event_prefecture;
|
||||
|
||||
@Override
|
||||
public static FindFragment newInstance(Bundle bundle) {
|
||||
FindFragment fragment = new FindFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
} @Override
|
||||
protected int getLayout() {
|
||||
return R.layout.find_fragment;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
@ -17,6 +18,11 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
private TextView title,tvForgetPaw, forgetPawGetNote;
|
||||
private EditText etForgetPawPhone, etForgetPawNote, etForgetPawPaw, etForgetPawConfirmPaw;
|
||||
|
||||
public static ForgetPawFragment newInstance(Bundle bundle) {
|
||||
ForgetPawFragment fragment = new ForgetPawFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_forget_paw;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
@ -17,7 +18,11 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
private Button btnBank;
|
||||
private TextView tvBank;
|
||||
|
||||
@Override
|
||||
public static GatheringFragment newInstance(Bundle bundle) {
|
||||
GatheringFragment fragment = new GatheringFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
} @Override
|
||||
protected int getLayout() {
|
||||
return R.layout.gathering_fragment;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@ -13,6 +14,11 @@ public class GradeFragment extends BaseFragment implements View.OnClickListener{
|
||||
|
||||
private ImageView ivGrade;
|
||||
|
||||
public static GradeFragment newInstance(Bundle bundle) {
|
||||
GradeFragment fragment = new GradeFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.grade_fragment;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -35,6 +36,11 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
private TextView otherAuditThrough;
|
||||
private TextView otherAuditNotThrough;
|
||||
|
||||
public static HasSubmitFragment newInstance(Bundle bundle) {
|
||||
HasSubmitFragment fragment = new HasSubmitFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_has_submit;
|
||||
|
@ -2,6 +2,7 @@ package com.navinfo.outdoor.fragment;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@ -37,6 +38,11 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
private IssueProblemAdapter issueProblemAdapter;
|
||||
private ArrayList<TaskExplainInfo.BodyBean.DataBean> issueList;
|
||||
|
||||
public static IssueFragment newInstance(Bundle bundle) {
|
||||
IssueFragment fragment = new IssueFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.issue_fragment;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
@ -33,6 +34,12 @@ public class IssueWebFragment extends BaseFragment implements View.OnClickListen
|
||||
"</div>";
|
||||
private WebView issueWebView;
|
||||
|
||||
public static IssueWebFragment newInstance(Bundle bundle) {
|
||||
IssueWebFragment fragment = new IssueWebFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_issue_web;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@ -15,6 +16,12 @@ public class MapDownloadFragment extends BaseFragment implements View.OnClickLis
|
||||
private ImageView ivDownLoad;
|
||||
private XRecyclerView recyclerView;
|
||||
|
||||
public static MapDownloadFragment newInstance(Bundle bundle) {
|
||||
MapDownloadFragment fragment = new MapDownloadFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.map_download_fragment;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
@ -27,6 +28,12 @@ public class MineFragment extends BaseFragment implements View.OnClickListener{
|
||||
private Button btnWithdraw,btnQuit;
|
||||
private RelativeLayout rlGrade, rlPrivilege, rlMap, rlIssue, rlContact, rlSet, rlAbout;
|
||||
|
||||
public static MineFragment newInstance(Bundle bundle) {
|
||||
MineFragment fragment = new MineFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.mine_fragment;
|
||||
|
@ -23,10 +23,7 @@ import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -40,10 +37,9 @@ import com.kongzue.dialog.util.DialogSettings;
|
||||
import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.activity.MainActivity;
|
||||
import com.navinfo.outdoor.adapter.PoiRecycleAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDialogFragment;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.bean.PoiBean;
|
||||
import com.navinfo.outdoor.room.PoiDao;
|
||||
@ -56,7 +52,6 @@ import com.navinfo.outdoor.util.ToastUtil;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -66,7 +61,7 @@ import static android.app.Activity.RESULT_OK;
|
||||
* 记录的Fragment
|
||||
* 2021-5-25
|
||||
*/
|
||||
public class PoiFragment extends BaseDialogFragment implements View.OnClickListener {
|
||||
public class PoiFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||
|
||||
private EditText editDescribe;
|
||||
private RelativeLayout rlPanorama, rlName, rlInternalPhotos, rlCard, rlElse;
|
||||
@ -90,6 +85,11 @@ public class PoiFragment extends BaseDialogFragment implements View.OnClickListe
|
||||
private CheckBox checkBoxLife;
|
||||
private CheckBox checkBoxRight;
|
||||
|
||||
public static PoiFragment newInstance(Bundle bundle) {
|
||||
PoiFragment fragment = new PoiFragment();
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.poi_fragment;
|
||||
@ -107,7 +107,6 @@ public class PoiFragment extends BaseDialogFragment implements View.OnClickListe
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
|
||||
poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
checkBoxLife = findViewById(R.id.check_pot_life);
|
||||
@ -218,6 +217,7 @@ public class PoiFragment extends BaseDialogFragment implements View.OnClickListe
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.POI_WORD_2) {
|
||||
@ -232,7 +232,7 @@ public class PoiFragment extends BaseDialogFragment implements View.OnClickListe
|
||||
case R.id.btn_save_local:
|
||||
XXPermissions.with(this)
|
||||
//读写权限
|
||||
.permission(Permission.READ_EXTERNAL_STORAGE)
|
||||
.permission(Permission.MANAGE_EXTERNAL_STORAGE)
|
||||
.request(new OnPermissionCallback() {
|
||||
@Override
|
||||
public void onGranted(List<String> permissions, boolean all) {
|
||||
@ -288,6 +288,8 @@ public class PoiFragment extends BaseDialogFragment implements View.OnClickListe
|
||||
Toast.makeText(getActivity(), "请拍照 名称", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
poiEntity.setType(0);
|
||||
poiEntity.setTaskStatus(0);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -297,6 +299,8 @@ public class PoiFragment extends BaseDialogFragment implements View.OnClickListe
|
||||
Message obtains = Message.obtain();
|
||||
obtains.what = Constant.TREASURE_FRAGMENT;
|
||||
obtains.obj = false;
|
||||
EventBus.getDefault().post(obtains);
|
||||
onBackPressed();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "没有申请权限,请手动申请", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -311,6 +315,7 @@ public class PoiFragment extends BaseDialogFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
case R.id.btn_uploading:
|
||||
Message obtain = Message.obtain();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@ -23,6 +24,12 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
private ImageView ivPoiTaskFinish;
|
||||
private XRecyclerView poiTaskXrv;
|
||||
|
||||
public static PoiTaskFragment newInstance(Bundle bundle) {
|
||||
PoiTaskFragment fragment = new PoiTaskFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_poi_task;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@ -13,6 +14,11 @@ public class PrivilegeFragment extends BaseFragment implements View.OnClickListe
|
||||
|
||||
private ImageView ivPrivilege;
|
||||
|
||||
public static PrivilegeFragment newInstance(Bundle bundle) {
|
||||
PrivilegeFragment fragment = new PrivilegeFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.privilege_fragment;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -28,6 +29,11 @@ public class RecordFragment extends BaseFragment implements View.OnClickListener
|
||||
private NoSlideViewPager vpRecord;
|
||||
private final String[] names = {"待提交", "已提交"};
|
||||
|
||||
public static RecordFragment newInstance(Bundle bundle) {
|
||||
RecordFragment fragment = new RecordFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
@ -20,6 +21,11 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
private ImageView ivRegisterCheck,ivFinish;
|
||||
private TextView haveGoLogin, tvRegister,registerGetNote;
|
||||
|
||||
public static RegisterFragment newInstance(Bundle bundle) {
|
||||
RegisterFragment fragment = new RegisterFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
|
@ -3,6 +3,7 @@ package com.navinfo.outdoor.fragment;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.media.MediaMetadataRetriever;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
@ -19,6 +20,7 @@ import com.hjq.permissions.Permission;
|
||||
import com.hjq.permissions.XXPermissions;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.PictureActivity;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.bean.JsonBean;
|
||||
@ -34,7 +36,7 @@ import java.util.List;
|
||||
* 寻宝-点击上传弹窗-道路
|
||||
*/
|
||||
|
||||
public class RoadFragment extends BaseFragment implements View.OnClickListener {
|
||||
public class RoadFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||
private TextView tvPictures;
|
||||
private EditText etRoadName;
|
||||
private ImageView ivRoadPicture;
|
||||
@ -49,6 +51,11 @@ public class RoadFragment extends BaseFragment implements View.OnClickListener {
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
|
||||
public static RoadFragment newInstance(Bundle bundle) {
|
||||
RoadFragment fragment = new RoadFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
|
@ -16,7 +16,11 @@ import com.navinfo.outdoor.base.BaseFragment;
|
||||
*/
|
||||
public class RoadTaskFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
|
||||
public static RoadTaskFragment newInstance(Bundle bundle) {
|
||||
RoadTaskFragment fragment = new RoadTaskFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_road_task;
|
||||
|
@ -2,6 +2,7 @@ package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
@ -26,6 +27,11 @@ public class SetFragment extends BaseFragment implements View.OnClickListener {
|
||||
private SharedPreferences.Editor navInfoEditor;
|
||||
private SharedPreferences navInfo;
|
||||
|
||||
public static SetFragment newInstance(Bundle bundle) {
|
||||
SetFragment fragment = new SetFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
|
@ -1,4 +1,5 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@ -43,6 +44,11 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
private TextView tvStayResult;
|
||||
private ArrayList<Object> poiEntities;
|
||||
|
||||
public static StaySubmitFragment newInstance(Bundle bundle) {
|
||||
StaySubmitFragment fragment = new StaySubmitFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_stay_submit;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.navinfo.outdoor.R;
|
||||
@ -9,6 +10,11 @@ import com.navinfo.outdoor.base.BaseFragment;
|
||||
* 发现-任务说明的Item点击进入Web页面
|
||||
*/
|
||||
public class TaskExWebFragment extends BaseFragment implements View.OnClickListener {
|
||||
public static TaskExWebFragment newInstance(Bundle bundle) {
|
||||
TaskExWebFragment fragment = new TaskExWebFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_task_ex_web;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@ -33,6 +34,12 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
private TaskExplainAdapter taskExplainAdapter;
|
||||
private int page1 = 1;
|
||||
|
||||
public static TaskExplainFragment newInstance(Bundle bundle) {
|
||||
TaskExplainFragment fragment = new TaskExplainFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.task_explain_fragment;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@ -35,13 +36,17 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
private ArrayList<TaskExplainInfo.BodyBean.DataBean> dataBeans2;
|
||||
private TaskExplainAdapter2 taskExplainAdapter2;
|
||||
|
||||
public static TaskExplainFragment2 newInstance(Bundle bundle) {
|
||||
TaskExplainFragment2 fragment = new TaskExplainFragment2();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_task_explain2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@ -35,6 +36,12 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
private List<TaskExplainBean.BodyBean.DataBean> dataBeanList;
|
||||
private TaskPrefectureAdapter taskPrefectureAdapter;
|
||||
private int page=1;
|
||||
|
||||
public static TaskPrefectureFragment newInstance(Bundle bundle) {
|
||||
TaskPrefectureFragment fragment = new TaskPrefectureFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.task_prefecture_fragment;
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Point;
|
||||
import android.location.Location;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
@ -18,6 +18,7 @@ import android.widget.Toast;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.permissions.OnPermissionCallback;
|
||||
import com.hjq.permissions.Permission;
|
||||
import com.hjq.permissions.XXPermissions;
|
||||
@ -29,6 +30,7 @@ import com.kongzue.dialog.v3.ShareDialog;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.NetWorkUtils;
|
||||
@ -85,7 +87,13 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
private CheckBox cbFootType;
|
||||
private ImageView ivFilter;
|
||||
private Point screenPosition; //marker的屏幕坐标
|
||||
private BaseDrawerFragment simulateFragments;
|
||||
|
||||
public static TreasureFragment newInstance(Bundle bundle) {
|
||||
TreasureFragment fragment = new TreasureFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
@ -97,6 +105,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
EventBus.getDefault().register(this);
|
||||
//fragment 管理器
|
||||
supportFragmentManager = getActivity().getSupportFragmentManager();
|
||||
sliding_layout = findViewById(R.id.sliding_layout);
|
||||
ivRefish = findViewById(R.id.iv_refrish);
|
||||
ivRefish.setOnClickListener(this::onClick);
|
||||
@ -149,11 +159,24 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
tencentMap.addMarker(new MarkerOptions(position));
|
||||
sliding_layout.setPanelHeight(0);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
||||
DialogSettings.style=DialogSettings.STYLE.STYLE_MIUI;
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", "位置信息", "采集").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
sliding_layout.setPanelHeight(1000);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||
switch (poiEntity.getType()){
|
||||
case 0:
|
||||
PoiFragment poiFragment = PoiFragment.newInstance(new Bundle());
|
||||
showSlidingFragment(poiFragment);
|
||||
break;
|
||||
case 1:
|
||||
RoadFragment roadFragment = RoadFragment.newInstance(new Bundle());
|
||||
showSlidingFragment(roadFragment);
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -182,18 +205,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
cbFootType.setVisibility(View.VISIBLE);
|
||||
ivSubmit.setVisibility(View.VISIBLE);
|
||||
ivFilter.setVisibility(View.VISIBLE);
|
||||
|
||||
sliding_layout.setPanelHeight(0);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
||||
if (poiFragment != null) {
|
||||
fragmentTransaction.hide(poiFragment);
|
||||
}
|
||||
if (roadFragment != null) {
|
||||
fragmentTransaction.hide(roadFragment);
|
||||
}
|
||||
if (filterFragment != null) {
|
||||
fragmentTransaction.hide(filterFragment);
|
||||
}
|
||||
if (marker != null) {
|
||||
marker.remove();
|
||||
}
|
||||
@ -202,6 +215,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
|
||||
private void initFilterMarker(List<PoiEntity> poiEntities) {
|
||||
sliding_layout.setPanelHeight(1000);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||
for (int i = 0; i < poiEntities.size(); i++) {
|
||||
LatLng position = new LatLng(Double.valueOf(poiEntities.get(i).getX()), Double.valueOf(poiEntities.get(i).getY()));
|
||||
tencentMap.addMarker(new MarkerOptions(position));
|
||||
@ -372,56 +387,56 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
List<ShareDialog.Item> itemList = new ArrayList<>();
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_poi, "POI"));
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_road, "道路"));
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.mipmap.filter, "筛选"));
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_chongdianzhuang, "充电站"));
|
||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_qingbao, "其他"));
|
||||
ShareDialog.show((AppCompatActivity) getActivity(), itemList, new ShareDialog.OnItemClickListener() {
|
||||
@Override
|
||||
public boolean onClick(ShareDialog shareDialog, int index, ShareDialog.Item item) {
|
||||
supportFragmentManager = getActivity().getSupportFragmentManager();
|
||||
fragmentTransaction = supportFragmentManager.beginTransaction();
|
||||
poiFragment = new PoiFragment();
|
||||
roadFragment = new RoadFragment();
|
||||
filterFragment = new FilterFragment();
|
||||
fragmentTransaction.add(R.id.dragView, poiFragment).add(R.id.dragView, roadFragment).add(R.id.dragView, filterFragment).commit();
|
||||
switch (index) {
|
||||
case 0:
|
||||
sliding_layout.setPanelHeight(1000);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||
fragmentTransaction.show(poiFragment);
|
||||
fragmentTransaction.hide(roadFragment).hide(filterFragment);
|
||||
fragmentTransaction.addToBackStack(null);
|
||||
PoiFragment poiFragment = PoiFragment.newInstance(new Bundle());
|
||||
showSlidingFragment(poiFragment);
|
||||
break;
|
||||
case 1:
|
||||
sliding_layout.setPanelHeight(1000);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||
fragmentTransaction.show(roadFragment);
|
||||
fragmentTransaction.hide(poiFragment).hide(filterFragment);
|
||||
fragmentTransaction.addToBackStack(null);
|
||||
RoadFragment roadFragment = RoadFragment.newInstance(new Bundle());
|
||||
showSlidingFragment(roadFragment);
|
||||
break;
|
||||
case 2:
|
||||
sliding_layout.setPanelHeight(1000);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||
fragmentTransaction.show(filterFragment);
|
||||
fragmentTransaction.hide(poiFragment).hide(roadFragment);
|
||||
fragmentTransaction.addToBackStack(null);
|
||||
case 3:
|
||||
break;
|
||||
case 4:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}).setTitle(title);
|
||||
break;
|
||||
case R.id.iv_filter:
|
||||
Intent intent = new Intent(getActivity(), FragmentManagement.class);
|
||||
intent.putExtra("tag", 35);
|
||||
startActivity(intent);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("test", "test");
|
||||
FilterFragment filterFragment = FilterFragment.newInstance(bundle);
|
||||
showSlidingFragment(filterFragment);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将fragment显示到抽屉内
|
||||
*/
|
||||
private void showSlidingFragment(BaseDrawerFragment fragment){
|
||||
fragmentTransaction = supportFragmentManager.beginTransaction();
|
||||
sliding_layout.setPanelHeight(1000);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||
fragmentTransaction.add(R.id.dragView, fragment, fragment.getClass().getName());
|
||||
if (!(fragment instanceof FilterFragment)) {
|
||||
FilterFragment filterFragment = (FilterFragment) supportFragmentManager.findFragmentByTag(FilterFragment.class.getName());
|
||||
if (filterFragment!=null) {
|
||||
fragmentTransaction.hide(filterFragment);
|
||||
}
|
||||
}
|
||||
fragmentTransaction.show(fragment);
|
||||
fragmentTransaction.addToBackStack(null);
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查网络状态
|
||||
*/
|
||||
@ -529,25 +544,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
Log.v("State changed", s + "===" + s1);
|
||||
}
|
||||
|
||||
//隐藏文字标注
|
||||
private void performPoiHide() {
|
||||
if (tencentMap == null || tencentMap.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
tencentMap.setPoisEnabled(false);
|
||||
}
|
||||
|
||||
//显示文字标注
|
||||
private void performPoiShow() {
|
||||
if (tencentMap == null || tencentMap.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
tencentMap.setPoisEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBackPressed() {
|
||||
return false;
|
||||
getActivity().finish();
|
||||
return true;
|
||||
}
|
||||
}
|
@ -23,6 +23,11 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
||||
private ImageView ivAttestation1;
|
||||
private ImageView ivAttestation;
|
||||
|
||||
public static UserAttestationFragment newInstance(Bundle bundle) {
|
||||
UserAttestationFragment fragment = new UserAttestationFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.user_attestation_fragment;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
@ -18,6 +19,12 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
private TextView tvText;
|
||||
private TextView tvAll ,tvUnit,tvAlready,tvTotal;
|
||||
|
||||
public static WithdrawFragment newInstance(Bundle bundle) {
|
||||
WithdrawFragment fragment = new WithdrawFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.withdraw_fragment;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@ -13,6 +14,11 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
||||
|
||||
private ImageView ivWithdraw;
|
||||
|
||||
public static WithdrawalRecordFragment newInstance(Bundle bundle) {
|
||||
WithdrawalRecordFragment fragment = new WithdrawalRecordFragment();
|
||||
fragment.setArguments(bundle);
|
||||
return fragment;
|
||||
}
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.withdrawal_record_fragment;
|
||||
|
@ -42,6 +42,21 @@ public interface PoiDao {
|
||||
@Delete
|
||||
void deletePoiEntity(PoiEntity... poiEntities);
|
||||
|
||||
/**
|
||||
*删除
|
||||
* @param poiEntities
|
||||
*/
|
||||
@Delete
|
||||
void deleteAll(List<PoiEntity> poiEntities);
|
||||
|
||||
/**
|
||||
* 根据条件删除
|
||||
* @param taskStatus
|
||||
*/
|
||||
@Query("DELETE FROM poi where taskStatus=:taskStatus")
|
||||
void deleteFormName(int taskStatus);
|
||||
|
||||
|
||||
/**
|
||||
* 全部删除
|
||||
*/
|
||||
|
@ -14,6 +14,7 @@ import java.util.List;
|
||||
public class PoiEntity {
|
||||
@PrimaryKey(autoGenerate = true) // 设置主键,并且自动生长
|
||||
private int id;
|
||||
|
||||
private int pid; //采集id 保存本地或提交数据时时返回
|
||||
private int taskId;//任务id
|
||||
private int userId;//用户id
|
||||
@ -41,6 +42,24 @@ public class PoiEntity {
|
||||
private String x;//经度
|
||||
private String y;//纬度
|
||||
private String detail;//深度信息
|
||||
private int taskStatus;//任务状态 0.待提交,1.已提交
|
||||
private int type;//0.poi,1.道路,2.充电站,3.其他
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getTaskStatus() {
|
||||
return taskStatus;
|
||||
}
|
||||
|
||||
public void setTaskStatus(int taskStatus) {
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
@ -178,4 +197,26 @@ public class PoiEntity {
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PoiEntity{" +
|
||||
"id=" + id +
|
||||
", pid=" + pid +
|
||||
", taskId=" + taskId +
|
||||
", userId=" + userId +
|
||||
", createTime='" + createTime + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", describe='" + describe + '\'' +
|
||||
", address='" + address + '\'' +
|
||||
", telPhone='" + telPhone + '\'' +
|
||||
", memo='" + memo + '\'' +
|
||||
", precision=" + precision +
|
||||
", photo='" + photo + '\'' +
|
||||
", photoInfo=" + photoInfo +
|
||||
", existence=" + existence +
|
||||
", x='" + x + '\'' +
|
||||
", y='" + y + '\'' +
|
||||
", detail='" + detail + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,6 @@ public class BounceZoomScrollView extends ScrollView {
|
||||
|
||||
private static final String TAG = "BounceScrollView";
|
||||
|
||||
|
||||
//----头部收缩属性--------
|
||||
|
||||
// 记录首次按下位置
|
||||
|
@ -0,0 +1,32 @@
|
||||
package com.navinfo.outdoor.util;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.room.PoiDao;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 删除数据库 已提交的数据,和本地的图片
|
||||
*/
|
||||
public class DataDeleteUtil {
|
||||
public void initData(Context context, List<PoiEntity> poiEntities) {
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(context);
|
||||
PoiDao poiDao = poiDatabase.getPoiDao();
|
||||
for (int i = 0; i < poiEntities.size(); i++) {
|
||||
int taskStatus = poiEntities.get(i).getTaskStatus();
|
||||
if (taskStatus==1){
|
||||
poiDao.deleteFormName(taskStatus);
|
||||
List<Info> photoInfo = poiEntities.get(i).getPhotoInfo();
|
||||
for (int i1 = 0; i1 < photoInfo.size(); i1++) {
|
||||
File deleteImage = new File(photoInfo.get(i1).getPhoto());
|
||||
deleteImage.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -30,6 +30,34 @@
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_name"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_name"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_name" />
|
||||
<TextView
|
||||
android:id="@+id/tv_git"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:text="已领取"
|
||||
android:padding="5dp"
|
||||
android:textColor="#FFC107"
|
||||
android:background="@drawable/underline"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_form"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_form"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_form" />
|
||||
<TextView
|
||||
android:id="@+id/tv_submit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:text="待提交"
|
||||
android:padding="5dp"
|
||||
android:textColor="#1CEF7B"
|
||||
android:background="@drawable/underline"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_form"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_form"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_form" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_task_id"
|
||||
|
Loading…
x
Reference in New Issue
Block a user