修改‘其他’页面的接口
This commit is contained in:
parent
8fc6ed7d2a
commit
ce4e734199
@ -94,6 +94,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
private ArrayList<File> otheruploadList;
|
private ArrayList<File> otheruploadList;
|
||||||
private String takePhotoPath;
|
private String takePhotoPath;
|
||||||
private String takePhotoPath2;
|
private String takePhotoPath2;
|
||||||
|
private PoiEntity poiEntity;
|
||||||
|
|
||||||
public static OtherFragment newInstance(Bundle bundle) {
|
public static OtherFragment newInstance(Bundle bundle) {
|
||||||
OtherFragment fragment = new OtherFragment();
|
OtherFragment fragment = new OtherFragment();
|
||||||
@ -299,7 +300,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
public void onGranted(List<String> permissions, boolean all) {
|
public void onGranted(List<String> permissions, boolean all) {
|
||||||
if (all) {
|
if (all) {
|
||||||
//保存数据库:
|
//保存数据库:
|
||||||
PoiEntity poiEntity = new PoiEntity();
|
poiEntity = new PoiEntity();
|
||||||
List<Info> infoList = new ArrayList<>();
|
List<Info> infoList = new ArrayList<>();
|
||||||
|
|
||||||
String name = editTaskName.getText().toString().trim();//名称
|
String name = editTaskName.getText().toString().trim();//名称
|
||||||
@ -379,12 +380,13 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case R.id.btn_other_uploading:
|
case R.id.btn_other_uploading:
|
||||||
otherUploadByNet();
|
|
||||||
|
otherUploadByNet(poiEntity);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void otherUploadByNet() {
|
private void otherUploadByNet(PoiEntity poiEntity) {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
otheruploadList = new ArrayList<>();
|
otheruploadList = new ArrayList<>();
|
||||||
File otherUploadFile = new File(takePhotoPath);
|
File otherUploadFile = new File(takePhotoPath);
|
||||||
@ -399,7 +401,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
.<NameAuthenticationBean>post(HttpInterface.USER_AUTH_ADD)
|
.<NameAuthenticationBean>post(HttpInterface.USER_AUTH_ADD)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
// 请求的 tag, 主要用于取消对应的请求
|
||||||
.params("userid", "1")
|
.params("auditId", poiEntity.getTaskId())
|
||||||
.addFileParams("file", otheruploadList)
|
.addFileParams("file", otheruploadList)
|
||||||
.tag(this)
|
.tag(this)
|
||||||
.execute(new DialogCallback<NameAuthenticationBean>(NameAuthenticationBean.class) {
|
.execute(new DialogCallback<NameAuthenticationBean>(NameAuthenticationBean.class) {
|
||||||
|
@ -108,6 +108,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
private String takePhotoPath4;
|
private String takePhotoPath4;
|
||||||
private String takePhotoPath3;
|
private String takePhotoPath3;
|
||||||
private String takePhotoPath1;
|
private String takePhotoPath1;
|
||||||
|
private PoiEntity poiEntity;
|
||||||
|
|
||||||
public static PoiFragment newInstance(Bundle bundle) {
|
public static PoiFragment newInstance(Bundle bundle) {
|
||||||
PoiFragment fragment = new PoiFragment();
|
PoiFragment fragment = new PoiFragment();
|
||||||
@ -371,7 +372,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
public void onGranted(List<String> permissions, boolean all) {
|
public void onGranted(List<String> permissions, boolean all) {
|
||||||
if (all) {
|
if (all) {
|
||||||
//保存数据库:
|
//保存数据库:
|
||||||
PoiEntity poiEntity = new PoiEntity();
|
poiEntity = new PoiEntity();
|
||||||
ArrayList<Info> infoPhoto = new ArrayList<>();
|
ArrayList<Info> infoPhoto = new ArrayList<>();
|
||||||
String name = editNameContent.getText().toString().trim();//名称
|
String name = editNameContent.getText().toString().trim();//名称
|
||||||
if (name == null || name.equals("")) {
|
if (name == null || name.equals("")) {
|
||||||
@ -477,7 +478,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
obtain.what = Constant.TREASURE_FRAGMENT;
|
obtain.what = Constant.TREASURE_FRAGMENT;
|
||||||
obtain.obj = false;
|
obtain.obj = false;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
poiUploadByNetWork();
|
poiUploadByNetWork(poiEntity);
|
||||||
break;
|
break;
|
||||||
case R.id.tv_examine:
|
case R.id.tv_examine:
|
||||||
Toast.makeText(getContext(), editNameContent.getText().toString(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), editNameContent.getText().toString(), Toast.LENGTH_SHORT).show();
|
||||||
@ -506,7 +507,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void poiUploadByNetWork() {
|
private void poiUploadByNetWork(PoiEntity poiEntity) {
|
||||||
poiUploadList = new ArrayList<>();
|
poiUploadList = new ArrayList<>();
|
||||||
File poiUploadFile1 = new File(takePhotoPath1);
|
File poiUploadFile1 = new File(takePhotoPath1);
|
||||||
File poiUploadFile2 = new File(takePhotoPath2);
|
File poiUploadFile2 = new File(takePhotoPath2);
|
||||||
@ -526,7 +527,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
.<NameAuthenticationBean>post(HttpInterface.USER_AUTH_ADD)
|
.<NameAuthenticationBean>post(HttpInterface.USER_AUTH_ADD)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
// 请求的 tag, 主要用于取消对应的请求
|
||||||
.params("auditId", "1")
|
.params("auditId", poiEntity.getTaskId())
|
||||||
.addFileParams("file",poiUploadList)
|
.addFileParams("file",poiUploadList)
|
||||||
.tag(this)
|
.tag(this)
|
||||||
.execute(new DialogCallback<NameAuthenticationBean>(NameAuthenticationBean.class) {
|
.execute(new DialogCallback<NameAuthenticationBean>(NameAuthenticationBean.class) {
|
||||||
|
5
app/src/main/res/drawable/ic_baseline_add_alert.xml
Normal file
5
app/src/main/res/drawable/ic_baseline_add_alert.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#F6F4F4"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M10.01,21.01c0,1.1 0.89,1.99 1.99,1.99s1.99,-0.89 1.99,-1.99h-3.98zM18.88,16.82L18.88,11c0,-3.25 -2.25,-5.97 -5.29,-6.69v-0.72C13.59,2.71 12.88,2 12,2s-1.59,0.71 -1.59,1.59v0.72C7.37,5.03 5.12,7.75 5.12,11v5.82L3,18.94L3,20h18v-1.06l-2.12,-2.12zM16,13.01h-3v3h-2v-3L8,13.01L8,11h3L11,8h2v3h3v2.01z"/>
|
||||||
|
</vector>
|
11
app/src/main/res/drawable/small_bell_text.xml
Normal file
11
app/src/main/res/drawable/small_bell_text.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!--<corners android:radius="50dp"/>-->
|
||||||
|
<!-- <solid android:color="@color/colorRed"/>-->
|
||||||
|
<corners android:radius="180dip" />
|
||||||
|
<solid android:color="#FF0000" />
|
||||||
|
<padding
|
||||||
|
android:left="4dip"
|
||||||
|
android:right="4dip" />
|
||||||
|
|
||||||
|
</shape>
|
@ -35,15 +35,23 @@
|
|||||||
</com.tencent.tencentmap.mapsdk.maps.MapView>
|
</com.tencent.tencentmap.mapsdk.maps.MapView>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_message"
|
android:id="@+id/iv_message"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="50dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="60dp"
|
android:layout_marginTop="60dp"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:background="@drawable/fuwu"
|
android:background="@drawable/ic_baseline_add_alert"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
</ImageView>
|
</ImageView>
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:text="10"-->
|
||||||
|
<!-- android:background="@drawable/small_bell_text"-->
|
||||||
|
<!-- android:textColor="@color/white"-->
|
||||||
|
<!-- app:layout_constraintTop_toTopOf="@+id/iv_message"-->
|
||||||
|
<!-- app:layout_constraintLeft_toRightOf="@+id/iv_message"/>-->
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/frame_layout"
|
android:id="@+id/frame_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -15,5 +15,6 @@
|
|||||||
<color name="colorHui">#95CAF6</color>
|
<color name="colorHui">#95CAF6</color>
|
||||||
<color name="colorRed">#F44236</color>
|
<color name="colorRed">#F44236</color>
|
||||||
<color name="colorText">#87CDF6</color>
|
<color name="colorText">#87CDF6</color>
|
||||||
|
<color name="colorRead">#ED1931</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user