Revert "frontCode"

This reverts commit 838e39690d.
LiuRuiXuan 2 years ago
parent 838e39690d
commit e48cfcfd1d

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- 通过GPS得到精确位置 -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- 通过网络得到粗略位置 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<!-- 访问网络,某些位置信息需要从网络服务器获取 -->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- 访问WiFi状态需要WiFi信息用于网络定位 -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<!-- 修改WiFi状态发起WiFi扫描, 需要WiFi信息用于网络定位 -->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<!-- 访问网络状态, 检测网络的可用性,需要网络运营商相关信息用于网络定位 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- 访问网络的变化, 需要某些信息用于网络定位 -->
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<!-- 蓝牙扫描权限 -->
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<!-- 前台service权限 -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<!-- 后台定位权限 -->
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<!-- A-GPS辅助定位权限方便GPS快速准确定位 -->
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:requestLegacyExternalStorage="true"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.MyApplication"
tools:targetApi="31">
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"/>
</provider>
<meta-data android:name="TencentMapSDK" android:value="3P5BZ-UWDK3-K5U34-RN5YR-3VQC6-XYBYX"/>
<activity android:name=".ui.index"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".BottomNavigiationActivity"
android:exported="true"
android:label="@string/title_activity_bottom_navigiation">
</activity>
<activity android:name=".ui.home.CameraPreview"
android:exported="true"
android:launchMode="standard"
>
</activity>
<activity android:name=".ui.home.ResultActivity"
android:exported="true"
android:launchMode="standard"
></activity>
</application>
</manifest>

@ -1,6 +0,0 @@
projectKey=Test
serverUrl=http://localhost:9000
serverVersion=9.9.0.65466
dashboardUrl=http://localhost:9000/dashboard?id=Test
ceTaskId=AYu0FgJhk-ulwfDUJI5I
ceTaskUrl=http://localhost:9000/api/ce/task?id=AYu0FgJhk-ulwfDUJI5I

Binary file not shown.

@ -1,23 +0,0 @@
package com.example.myapplication.ui.Buttonfragments;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import com.example.myapplication.R;
public class HazardGarbageFragment extends Fragment {//有害垃圾介绍
public HazardGarbageFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.hazard_garbage, container, false);
}
}

@ -1,23 +0,0 @@
package com.example.myapplication.ui.Buttonfragments;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import com.example.myapplication.R;
public class KitchenGarbageFragment extends Fragment {//厨余垃圾介绍
public KitchenGarbageFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.kitchen_garbage, container, false);
}
}

@ -1,23 +0,0 @@
package com.example.myapplication.ui.Buttonfragments;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import com.example.myapplication.R;
public class OtherGarbageFragment extends Fragment {//其他垃圾介绍
public OtherGarbageFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.other_garbage, container, false);
}
}

@ -1,23 +0,0 @@
package com.example.myapplication.ui.Buttonfragments;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import com.example.myapplication.R;
public class RecycleGarbageFragment extends Fragment {//可回收垃圾介绍
public RecycleGarbageFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.recycle_garbage, container, false);
}
}

@ -1,88 +0,0 @@
package com.example.myapplication.ui.dashboard;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import com.example.myapplication.R;
import com.example.myapplication.databinding.FragmentDashboardBinding;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.tencent.lbssearch.TencentSearch;
import com.tencent.lbssearch.httpresponse.HttpResponseListener;
import com.tencent.lbssearch.object.param.WalkingParam;
import com.tencent.lbssearch.object.result.WalkingResultObject;
import com.tencent.tencentmap.mapsdk.maps.CameraUpdateFactory;
import com.tencent.tencentmap.mapsdk.maps.TencentMapInitializer;
import com.tencent.tencentmap.mapsdk.maps.TextureMapView;
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
public class MapActivity extends Fragment {
private TextureMapView mapView;
private FloatingActionButton currentPositioning;
private FloatingActionButton nearbyTrashBinChoose;
private FloatingActionButton navigation;
private FragmentDashboardBinding binding;
private MapPositioning controller;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
MapActivityViewModel dashboardViewModel = new ViewModelProvider(this).get(MapActivityViewModel.class);
TencentMapInitializer.setAgreePrivacy(true);
binding = FragmentDashboardBinding.inflate(inflater, container, false);
View root = binding.getRoot();
mapView = root.findViewById(R.id.mapview);
currentPositioning = root.findViewById(R.id.Get_Current_Location);
nearbyTrashBinChoose = root.findViewById(R.id.check_nearby_trash_cans);
navigation = root.findViewById(R.id.navigiation);
controller = new MapPositioning(mapView, binding,getActivity());
currentPositioning.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
controller.onClickCurrentPositioning();
}
});
nearbyTrashBinChoose.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
controller.onClickNearbyTrashBinChoose();
}
});
navigation.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
controller.onClickNavigation();
}
});
controller.startLocationUpdates();
return root;
}
@Override
public void onDestroyView() {
super.onDestroyView();
controller.stopLocationUpdates();
mapView.onDestroy();
binding = null;
}
}

@ -1,19 +0,0 @@
package com.example.myapplication.ui.dashboard;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class MapActivityViewModel extends ViewModel {
private final MutableLiveData<String> mText;
public MapActivityViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is dashboard fragment");
}
public LiveData<String> getText() {
return mText;
}
}

@ -1,233 +0,0 @@
package com.example.myapplication.ui.dashboard;
import android.graphics.Color;
import android.view.View;
import android.widget.Toast;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.ViewModelProvider;
import com.example.myapplication.databinding.FragmentDashboardBinding;
import com.tencent.lbssearch.TencentSearch;
import com.tencent.lbssearch.httpresponse.HttpResponseListener;
import com.tencent.lbssearch.object.param.WalkingParam;
import com.tencent.lbssearch.object.result.WalkingResultObject;
import com.tencent.map.geolocation.TencentLocationManager;
import com.tencent.map.geolocation.TencentLocationRequest;
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
import com.tencent.tencentmap.mapsdk.maps.CameraUpdateFactory;
import com.tencent.tencentmap.mapsdk.maps.TencentMap;
import com.tencent.tencentmap.mapsdk.maps.TextureMapView;
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
import com.tencent.tencentmap.mapsdk.maps.model.LatLngBounds;
import com.tencent.tencentmap.mapsdk.maps.model.Marker;
import com.tencent.tencentmap.mapsdk.maps.model.MarkerOptions;
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
import java.util.ArrayList;
import java.util.List;
public class MapPositioning {
private TextureMapView mapView;
private TencentMap tencentMap;
private FragmentDashboardBinding binding;
private List<LatLng> TrashBin;
private FragmentActivity fragmentActivity;
static double currentLatitude;
static double currentLongitude;
TencentSearch tencentSearch;
WalkingParam walkingParam;
LatLng chooseTrashBin;
public float calculateDistance(LatLng start, LatLng end) {//计算所有标记垃圾桶与当前位置的距离
double earthRadius = 6371;
double lat1 = Math.toRadians(start.getLatitude());
double lon1 = Math.toRadians(start.getLongitude());
double lat2 = Math.toRadians(end.getLatitude());
double lon2 = Math.toRadians(end.getLongitude());
double deltaLat = lat2 - lat1;
double deltaLon = lon2 - lon1;
double a = Math.sin(deltaLat / 2) * Math.sin(deltaLat / 2)
+ Math.cos(lat1) * Math.cos(lat2)
* Math.sin(deltaLon / 2) * Math.sin(deltaLon / 2);
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
return (float) (earthRadius * c);
}
private HttpResponseListener<WalkingResultObject> httpResponseListener;
public MapPositioning(TextureMapView mapView, FragmentDashboardBinding binding,FragmentActivity activity) {//初始化,
this.mapView = mapView;
this.binding = binding;
tencentMap = mapView.getMap();
tencentMap.setMyLocationEnabled(true);
tencentMap.enableMultipleInfowindow(true);
fragmentActivity=activity;
TrashBin=new ArrayList<>();
TrashBin.add(new LatLng(39.111981,117.350131));//添加垃圾桶位置信息
TrashBin.add(new LatLng(39.112578,117.349414));
TrashBin.add(new LatLng(39.112062,117.349687));
TrashBin.add(new LatLng(39.1162,117.350954));
TrashBin.add(new LatLng(39.115949,117.351535));
TrashBin.add(new LatLng(39.115614,117.351487));
TrashBin.add(new LatLng(39.115767,117.351119));
tencentSearch=new TencentSearch(mapView.getContext());
httpResponseListener = new HttpResponseListener<WalkingResultObject>() {
@Override
public void onSuccess(int i, WalkingResultObject walkingResultObject) {
if(walkingParam==null)
{
return ;
}
for(WalkingResultObject.Route route:walkingResultObject.result.routes)
{
List<LatLng> polyline = route.polyline;
tencentMap.addPolyline(new PolylineOptions().addAll(polyline).width(5f).color(Color.RED));
}
}
@Override
public void onFailure(int i, String s, Throwable throwable) {
}
};
tencentMap.setOnMarkerClickListener(new TencentMap.OnMarkerClickListener() {//根据当前上一次的点击事件,判断是否为双击事件,如果是双击事件就进行导航
private long lastClickTime;
@Override
public boolean onMarkerClick(Marker marker) {
long clicktime=System.currentTimeMillis();
if(clicktime-lastClickTime<1000)
{
LatLng now = marker.getPosition();
walkingParam=new WalkingParam(new LatLng(currentLatitude,currentLongitude),now);
tencentSearch.getRoutePlan(walkingParam, httpResponseListener);
}
lastClickTime=clicktime;
return true;
}
});
}
public void onClickCurrentPositioning() {//发送请求,获取当前位置信息
String message = "当前位置:纬度:" + currentLatitude + ",经度:" + currentLongitude;
Toast.makeText(mapView.getContext(), message, Toast.LENGTH_SHORT).show();
tencentMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(currentLatitude,currentLongitude)));
}
public void onClickNearbyTrashBinChoose() {//显示附近的垃圾桶位置信息
long st=System.currentTimeMillis();
LatLngBounds.Builder builder = new LatLngBounds.Builder();
for(LatLng trashBin:TrashBin)
{
tencentMap.addMarker(new MarkerOptions(trashBin));
}
builder.include(new LatLng(currentLatitude,currentLongitude));
for(LatLng trashBin:TrashBin)
{
builder.include(trashBin);
}
LatLngBounds bounds = builder.build();
int padding=100;
CameraUpdate cameraUpdate=CameraUpdateFactory.newLatLngBounds(bounds,padding);
tencentMap.moveCamera(cameraUpdate);
long ed=System.currentTimeMillis();
System.out.println(ed);
}
public void onClickNavigation() {//进行导航功能
double shortestDistance=Double.MAX_VALUE;
LatLng now = new LatLng(currentLatitude, currentLongitude);
for(LatLng trashBin:TrashBin)//获取所有垃圾桶位置信息并计算距离
{
double distance=calculateDistance(now,trashBin);
if(distance<shortestDistance)
{
shortestDistance=distance;
chooseTrashBin=trashBin;
}
}
walkingParam = new WalkingParam(now,chooseTrashBin);
tencentSearch.getRoutePlan(walkingParam,httpResponseListener);
LatLngBounds.Builder builder = new LatLngBounds.Builder();
builder.include(now);
builder.include(chooseTrashBin);
LatLngBounds bounds = builder.build();
int padding=100;
CameraUpdate cameraUpdate=CameraUpdateFactory.newLatLngBounds(bounds,padding);
tencentMap.moveCamera(cameraUpdate);
}
public void startLocationUpdates() {//更新地图位置信息
TencentLocationManager mLocationManager=TencentLocationManager.getInstance(fragmentActivity,null);
mLocationManager.setCoordinateType(TencentLocationManager.COORDINATE_TYPE_GCJ02);
TencentLocationRequest request= TencentLocationRequest.create();
request.setRequestLevel(TencentLocationRequest.REQUEST_LEVEL_ADMIN_AREA);
MyLocationListener myLocationListener=new MyLocationListener(tencentMap,fragmentActivity);
request.setInterval(3000);
mLocationManager.requestLocationUpdates(request,myLocationListener,TencentLocationRequest.REQUEST_LEVEL_GEO);
}
public void stopLocationUpdates() {//停止地图位置信息控制
TencentLocationManager mLocationManager=TencentLocationManager.getInstance(fragmentActivity,null);
MyLocationListener myLocationListener=new MyLocationListener(tencentMap,fragmentActivity);
mLocationManager.removeUpdates(myLocationListener);
}
}

@ -1,133 +0,0 @@
package com.example.myapplication.ui.dashboard;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.util.Log;
import android.view.Display;
import android.view.Surface;
import android.view.WindowManager;
import android.widget.Toast;
import androidx.fragment.app.FragmentActivity;
import com.tencent.map.geolocation.TencentLocation;
import com.tencent.map.geolocation.TencentLocationListener;
import com.tencent.tencentmap.mapsdk.maps.TencentMap;
import com.tencent.tencentmap.mapsdk.maps.TencentMapNavi;
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
import com.tencent.tencentmap.mapsdk.maps.model.Marker;
import com.tencent.tencentmap.mapsdk.maps.model.MarkerOptions;
public class MyLocationListener implements TencentLocationListener, SensorEventListener {
private final int TIME_SENSOR = 10;
private TencentMap tencentMap;
private Marker marker;
private FragmentActivity activity;
private long lastTime;
private static float mAngle;
private Sensor orientationSensor;
private SensorManager sensorManager;
public MyLocationListener(TencentMap tencentMap, FragmentActivity activity) {
this.tencentMap = tencentMap;
this.activity = activity;
this.lastTime = System.currentTimeMillis();
sensorManager = (SensorManager) activity.getSystemService(Context.SENSOR_SERVICE);
orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);
sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_NORMAL);
}
@Override
public void onLocationChanged(TencentLocation location, int error, String reason) {//发送请求
if (error == TencentLocation.ERROR_OK) {
// 定位成功
double latitude = location.getLatitude();
double longitude = location.getLongitude();
MapPositioning.currentLatitude=latitude;
MapPositioning.currentLongitude=longitude;
Log.d("latitude", "onLocationChanged: "+latitude);
Log.d("longitude","onLocationChanged"+longitude);
LatLng latLng = new LatLng(latitude, longitude);
if (marker != null) {
marker.remove(); // 清除之前的标记
}
marker = tencentMap.addMarker(new MarkerOptions(latLng));
marker.setRotation(mAngle);// 自定义标记图标
} else {
// 处理定位失败的情况
Toast.makeText(activity, "定位失败:" + reason, Toast.LENGTH_SHORT).show();
}
}
@Override
public void onStatusUpdate(String name, int status, String desc) {
// 处理位置提供者状态变化的情况
}
@Override
public void onGnssInfoChanged(Object o) {
}
@Override
public void onNmeaMsgChanged(String s) {
}
public static int getScreenRotationOnPhone(Context context) {//获取手机的角度信息
final Display display = ((WindowManager) context
.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
switch (display.getRotation()) {
case Surface.ROTATION_0:
return 0;
case Surface.ROTATION_90:
return 90;
case Surface.ROTATION_180:
return 180;
case Surface.ROTATION_270:
return -90;
}
return 0;
}
@Override
public void onSensorChanged(SensorEvent event) {//获取当前手机的方向
if (System.currentTimeMillis() - lastTime < TIME_SENSOR) {
return;
}
switch (event.sensor.getType()) {
case Sensor.TYPE_ORIENTATION: {
float x = event.values[0];
x += getScreenRotationOnPhone(activity);
x %= 360.0F;
if (x > 180.0F)
x -= 360.0F;
else if (x < -180.0F)
x += 360.0F;
if (Math.abs(mAngle - x) < 3.0f) {
break;
}
mAngle = Float.isNaN(x) ? 0 : x;
if (marker != null) {
marker.setRotation(mAngle);
}
lastTime = System.currentTimeMillis();
}
}
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
}

@ -1,34 +0,0 @@
package com.example.myapplication.ui;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import androidx.appcompat.app.AppCompatActivity;
import com.example.myapplication.BottomNavigiationActivity;
import com.example.myapplication.R;
import com.example.myapplication.ui.home.GarbageRecognitionActivity;
public class index extends AppCompatActivity {
private static final long SPLASH_DELAY = 800; // 延迟时间,单位为毫秒,启动界面
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.getSupportActionBar().hide();
// 设置启动页布局文件
setContentView(R.layout.launch_screen);
// 延迟跳转到主界面
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(index.this, BottomNavigiationActivity.class);
startActivity(intent);
finish(); // 销毁当前活动,防止用户返回到启动页
}
}, SPLASH_DELAY);
}
}

@ -1,125 +0,0 @@
package com.example.myapplication.ui.notifications;
import android.util.Log;
import android.widget.Toast;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
public class FeedbackUploader {//反馈信息与后端进行交互
public static void submitFeedback(UserFeedbackActivity userFeedbackActivity, String imagePath,String additionalString) {
ExecutorService executorService = Executors.newFixedThreadPool(1);
Toast toast = new Toast(userFeedbackActivity.getActivity());
Future<Void> uploadTask = executorService.submit(() -> {
try {
Log.d("s2","t1");
String uploadImageUrl = "http://192.168.203.243:5000/upload_image"; // 替换为图片上传的URL
String uploadStringUrl = "http://192.168.203.243:5000/upload_text"; // 替换为字符串上传的URL
Log.d("s2","t2");
File imageFile = new File(imagePath);
if (!imageFile.exists()) {
Log.d("s2","t3");
System.out.println("Image file not found.");
return null;
}
Log.d("s2","t1");
// 发送图片
URL imageUrl = new URL(uploadImageUrl);
HttpURLConnection imageConnection = (HttpURLConnection) imageUrl.openConnection();
imageConnection.setRequestMethod("POST");
imageConnection.setDoOutput(true);
// 构建请求体
String boundary = "*****";
String lineEnd = "\r\n";
String twoHyphens = "--";
imageConnection.setRequestProperty("Content-Type", "multipart/form-data;boundary=" + boundary);
DataOutputStream imageDos = new DataOutputStream(imageConnection.getOutputStream());
imageDos.writeBytes(twoHyphens + boundary + lineEnd);
imageDos.writeBytes("Content-Disposition: form-data; name=\"file\";filename=\"" + imageFile.getName() + "\"" + lineEnd);
imageDos.writeBytes("Content-Type: image/jpeg" + lineEnd);
imageDos.writeBytes(lineEnd);
FileInputStream imageInputStream = new FileInputStream(imageFile);
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = imageInputStream.read(buffer)) != -1) {
imageDos.write(buffer, 0, bytesRead);
}
imageDos.writeBytes(lineEnd);
imageDos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);
Log.d("s2","t1");
// 发送图片请求并获取响应
int imageResponseCode = imageConnection.getResponseCode();
if (imageResponseCode == HttpURLConnection.HTTP_OK) {
// 图片上传成功
// System.out.println("Image uploaded successfully.");
InputStream inputStream = imageConnection.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
String line;
line=reader.readLine();
inputStream.close();
Log.d("s2","t2");
// 发送字符串
URL urlString = new URL(uploadStringUrl);
HttpURLConnection stringConnection = (HttpURLConnection) urlString.openConnection();
stringConnection.setRequestMethod("POST");
stringConnection.setDoOutput(true);
stringConnection.setRequestProperty("Content-Type", "text/plain");
OutputStream stringOs = stringConnection.getOutputStream();
stringOs.write(additionalString.getBytes("UTF-8"));
stringOs.flush();
stringOs.close();
// 获取字符串上传响应
int stringResponseCode = stringConnection.getResponseCode();
if (stringResponseCode == HttpURLConnection.HTTP_OK) {
Log.d("s2","t3");
// 字符串上传成功
InputStream inputStream2 = stringConnection.getInputStream();
BufferedReader reader2 = new BufferedReader(new InputStreamReader(inputStream2));
while ((line = reader2.readLine()) != null) {
System.out.println(line);
}
inputStream2.close();
toast.setText("图片上传成功!");
} else {
toast.setText("图片上传失败");
// 字符串上传失败
System.out.println("String upload failed with response code: " + stringResponseCode);
}
} else {
// 图片上传失败
toast.setText("图片上传失败");
System.out.println("Image upload failed with response code: " + imageResponseCode);
}
imageInputStream.close();
imageDos.flush();
imageDos.close();
} catch (Exception e) {
e.printStackTrace();
}finally {
toast.show();
}
return null;
});
// 等待上传任务完成
try {
uploadTask.get();
} catch (Exception e) {
e.printStackTrace();
}
// 关闭线程池
executorService.shutdown();
}
}

@ -1,100 +0,0 @@
package com.example.myapplication.ui.notifications;
import android.database.Cursor;
import android.net.Uri;
import android.provider.MediaStore;
public class UserFeedback {
public UserFeedbackActivity userFeedbackActivity;
public UserFeedback(UserFeedbackActivity userFeedbackActivity) {
this.userFeedbackActivity = userFeedbackActivity;
}
public void resetAll()//清空所有按钮内容
{
userFeedbackActivity.editText.setText("");
userFeedbackActivity.userExperience.setChecked(false);
userFeedbackActivity.positiveRecommendation.setChecked(false);
userFeedbackActivity.otherIssues.setChecked(false);
userFeedbackActivity.classificationExpansion.setChecked(false);
userFeedbackActivity.functionalRecommendations.setChecked(false);
userFeedbackActivity.identifyDeviations.setChecked(false);
}
public String getRealPathFromURI(Uri contentUri) {//获取对应图片的URI
String[] proj = { MediaStore.Images.Media.DATA };
Cursor cursor = userFeedbackActivity.getContext().getContentResolver().query(contentUri, proj, null, null, null);
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
String path = cursor.getString(column_index);
cursor.close();
return path;
}
public void submitFeedback(Uri uri)//提交反馈
{
String feedback=recordFeedback();
FeedbackUploader.submitFeedback(userFeedbackActivity,getRealPathFromURI(uri),feedback);
}
public String recordFeedback()//格式化字符串方便与服务端进行通信格式为100011|文本信息,前面六位依次对应用户体验、识别偏差、功能建议、分类扩充、其他问题、好评推荐,|是分隔符,然后是文本数据即用户提交的数据
{
StringBuilder sb = new StringBuilder();
if(userFeedbackActivity.positiveRecommendation.isChecked())
{
sb.append('1');
}
else
{
sb.append('0');
}
if(userFeedbackActivity.otherIssues.isChecked())
{
sb.append('1');
}
else
{
sb.append('0');
}
if(userFeedbackActivity.classificationExpansion.isChecked())
{
sb.append('1');
}
else
{
sb.append('0');
}
if(userFeedbackActivity.functionalRecommendations.isChecked())
{
sb.append('1');
}
else
{
sb.append('0');
}
if(userFeedbackActivity.identifyDeviations.isChecked())
{
sb.append('1');
}
else
{
sb.append('0');
}
if(userFeedbackActivity.userExperience.isChecked())
{
sb.append('1');
}
else
{
sb.append('0');
}
String contentEditText=userFeedbackActivity.editText.getText().toString();
sb.append('|');
return sb.toString()+contentEditText;
}
}

@ -1,124 +0,0 @@
package com.example.myapplication.ui.notifications;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageButton;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import com.example.myapplication.R;
import com.example.myapplication.databinding.FragmentNotificationsBinding;
import com.example.myapplication.ui.home.ImageUploader;
import com.google.android.material.checkbox.MaterialCheckBox;
public class UserFeedbackActivity extends Fragment {
private FragmentNotificationsBinding binding;
private ImageButton buttonSelectImage;
public EditText editText;
private Button submit,reset;
private UserFeedback userFeedback;
private Uri uri;
public MaterialCheckBox userExperience,identifyDeviations,functionalRecommendations,classificationExpansion,otherIssues,positiveRecommendation;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
UserFeedbackViewModel notificationsViewModel =
new ViewModelProvider(this).get(UserFeedbackViewModel.class);
userFeedback = new UserFeedback(this);
binding = FragmentNotificationsBinding.inflate(inflater, container, false);
View root = binding.getRoot();
editText = root.findViewById(R.id.input_feedback);
buttonSelectImage = root.findViewById(R.id.btn_select_image);
userExperience=root.findViewById(R.id.user_experience);
identifyDeviations=root.findViewById(R.id.identify_deviations);
functionalRecommendations = root.findViewById(R.id.functional_recommendations);
classificationExpansion = root.findViewById(R.id.classification_expansion);
otherIssues = root.findViewById(R.id.other_issues);
positiveRecommendation = root.findViewById(R.id.positive_recommendation);
submit = root.findViewById(R.id.submit);
reset = root.findViewById(R.id.reset);
editText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
editText.setCursorVisible(false);
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
if(editable != null&& editable.toString().length()>0)
{
editText.setCursorVisible(true);
editText.setGravity(Gravity.START);
}
else
{
editText.setGravity(Gravity.CENTER);
}
}
});
buttonSelectImage.setOnClickListener(new View.OnClickListener() {//跳转到相册界面
@Override
public void onClick(View view) {
Intent intent = new Intent(Intent.ACTION_PICK,null);
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,"image/*");
startActivityForResult(intent,2);
}
});
submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
userFeedback.submitFeedback(uri);
}
});
reset.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
userFeedback.resetAll();
}
});
return root;
}
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {//获取用户选择的相册的图片
if(resultCode==-1)
{
if(data!=null)
{
uri = data.getData();
buttonSelectImage.setImageURI(uri);
}
}
}
@Override
public void onDestroyView() {
super.onDestroyView();
binding = null;
}
}

@ -1,19 +0,0 @@
package com.example.myapplication.ui.notifications;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class UserFeedbackViewModel extends ViewModel {
private final MutableLiveData<String> mText;
public UserFeedbackViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is notifications fragment");
}
public LiveData<String> getText() {
return mText;
}
}

@ -1,98 +0,0 @@
package com.example.myapplication.ui.quiz;
import android.graphics.Color;
import android.media.session.MediaSession;
import android.widget.MultiAutoCompleteTextView;
import android.widget.Toast;
import androidx.fragment.app.FragmentActivity;
import com.example.myapplication.R;
import com.example.myapplication.ui.tools.Problem;
import java.io.FileInputStream;
import java.io.IOException;
public class GarbageQuiz {
private Problem problemTool,analysisTool;//问题分析和分析分析的类对象
private GarbageQuizActivity fragment;//对应的界面
GarbageQuiz(GarbageQuizActivity fragmentActivity) throws IOException {
this.fragment=fragmentActivity;
problemTool = new Problem(fragment.getResources().openRawResource(R.raw.question));
analysisTool = new Problem(fragment.getResources().openRawResource(R.raw.answer));
}
void clearOptionColor()//清空之前活动的选项
{
fragment.aButton.setTextColor(Color.BLACK);
fragment.bButton.setTextColor(Color.BLACK);
fragment.cButton.setTextColor(Color.BLACK);
fragment.dButton.setTextColor(Color.BLACK);
}
public void chooseAOption()//选中A选项下面依次是选B、C、D选中后清空之前的选项文本颜色对应的选项文本颜色变为绿色
{
String answer = analysisTool.getAnswer(problemTool.getNow());
fragment.analysisTextView.setText(answer);
clearOptionColor();
fragment.aButton.setTextColor(Color.rgb(177,247,206));
}
public void chooseBOption()
{
String answer = analysisTool.getAnswer(problemTool.getNow());
fragment.analysisTextView.setText(answer);
clearOptionColor();
fragment.bButton.setTextColor(Color.rgb(177,247,206));
}
public void chooseCOption()
{
String answer = analysisTool.getAnswer(problemTool.getNow());
fragment.analysisTextView.setText(answer);
clearOptionColor();
fragment.cButton.setTextColor(Color.rgb(177,247,206));
}
public void chooseDOption()
{
String answer = analysisTool.getAnswer(problemTool.getNow());
fragment.analysisTextView.setText(answer);
clearOptionColor();
fragment.dButton.setTextColor(Color.rgb(177,247,206));
}
public void getLastQuestion()//获取前一个问题,如果是第一个问题,提示用户
{
clearOptionColor();
fragment.analysisTextView.setText("");
String[] strings = problemTool.getPreQuestion();
if (strings == null) {
Toast.makeText(this.fragment.getActivity(), "这已经是第一个问题啦", Toast.LENGTH_SHORT).show();
return;
}
fragment.question.setText(strings[0]);
fragment.aButton.setText(strings[1]);
fragment.bButton.setText(strings[2]);
fragment.cButton.setText(strings[3]);
fragment.dButton.setText(strings[4]);
}
public void getNextQuestion()//获取后一个问题,假如是最后一个问题,提示用户
{
clearOptionColor();
fragment.analysisTextView.setText("");
String[] strings = problemTool.getNextQuestion();
if (strings == null) {
Toast.makeText(this.fragment.getActivity(), "这已经是最后一个问题啦", Toast.LENGTH_SHORT).show();
return;
}
fragment.question.setText(strings[0]);
fragment.aButton.setText(strings[1]);
fragment.bButton.setText(strings[2]);
fragment.cButton.setText(strings[3]);
fragment.dButton.setText(strings[4]);
}
}

@ -1,94 +0,0 @@
package com.example.myapplication.ui.quiz;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import com.example.myapplication.R;
import com.example.myapplication.databinding.GarbageQuizBinding;
import com.example.myapplication.ui.home.GarbageRecognition;
import com.example.myapplication.ui.home.GarbageRecognitionActivityViewModel;
import com.example.myapplication.ui.notifications.UserFeedbackViewModel;
import java.io.IOException;
public class GarbageQuizActivity extends Fragment {
private GarbageQuizBinding binding;
public Button aButton,bButton,cButton,dButton;
private ImageButton preQuestionButton,nextQuestionButton;
private GarbageQuiz garbageQuiz;
public TextView question,analysisTextView;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
com.example.myapplication.ui.newthing.GarbageQuizViewModel notificationsViewModel =
new ViewModelProvider(this).get(com.example.myapplication.ui.newthing.GarbageQuizViewModel.class);
binding = GarbageQuizBinding.inflate(inflater,container,false);
View root = binding.getRoot();
aButton = root.findViewById(R.id.a_option);
bButton = root.findViewById(R.id.b_option);
cButton = root.findViewById(R.id.c_option);
dButton = root.findViewById(R.id.d_option);
question = root.findViewById(R.id.question);
analysisTextView = root.findViewById(R.id.analysisTextView);
preQuestionButton = root.findViewById(R.id.pre_question);
nextQuestionButton = root.findViewById(R.id.next_question);
try {
garbageQuiz =new GarbageQuiz(this);
} catch (IOException e) {
throw new RuntimeException(e);
}
aButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
garbageQuiz.chooseAOption();
}
});
bButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
garbageQuiz.chooseBOption();
}
});
cButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
garbageQuiz.chooseCOption();
}
});
dButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
garbageQuiz.chooseDOption();
}
});
preQuestionButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
garbageQuiz.getLastQuestion();
}
});
nextQuestionButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
garbageQuiz.getNextQuestion();
}
});
nextQuestionButton.performClick();
return root;
}
}

@ -1,19 +0,0 @@
package com.example.myapplication.ui.newthing;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class GarbageQuizViewModel extends ViewModel {
private MutableLiveData<String> mText;
public GarbageQuizViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is new fragment");//根据自己喜欢放界面的测试文字
}
public LiveData<String> getText() {
return mText;
}
}

@ -1,107 +0,0 @@
package com.example.myapplication.ui.tools;
import android.util.Log;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellValue;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class Problem {
private XSSFWorkbook workbook;
private int start;
private int end;
private int sz;
private int now=-1;
private boolean flag=true;
private ArrayList<String []>question;//存储对应的问题
private ArrayList<Integer> rowNum;//存储目前问题对应的xlsx行数
Sheet sheet;
public int getNow()
{
return rowNum.get(now);
}
public Problem(InputStream file) throws IOException {//打开res库中的xlsx读取对应的图库和解析
rowNum = new ArrayList<>();
try
{
workbook = new XSSFWorkbook(file);
sheet = workbook.getSheetAt(0);
sz = sheet.getPhysicalNumberOfRows();
Random random = new Random();
int randomNumber = random.nextInt(sz);
question = new ArrayList<>();
start=end=randomNumber;
int i;
int tmp=sz;
for(i=start;tmp!=0;tmp--,i++)
{
rowNum.add(i%sz);
Row row = sheet.getRow((i)%sz);
Cell cell = row.getCell(1);
if(cell != null)
{
String cellValue = cell.getStringCellValue();
cellValue=cellValue.replace(""," ");
String[] split = cellValue.split(" ");
question.add(split);
}
}
}catch (Exception e)
{
e.printStackTrace();
System.out.println("读取文件失败");
}
}
public void close() throws IOException {
workbook.close();
}
public String[] getPreQuestion()//获取前一个问题
{
if(now-1>=0)return question.get(--now);
else return null;
}
public String[] getNextQuestion()//获取后一个问题
{
if(now+1<question.size())return question.get(++now);
return null;
}
public String getAnswer(int row)//获取对应行的解析
{
Row nrow = sheet.getRow(row);
Cell cell = nrow.getCell(1);
Cell cell1 = nrow.getCell(2);
if(cell != null)
{
String cellValue = cell.getStringCellValue();
if(cell1 != null)
{
cellValue+=":";
cellValue+=cell1.getStringCellValue();
}
return cellValue;
}
return null;
}
}

@ -1 +0,0 @@
sonar-scanner.bat -D"sonar.projectKey=tsq" -D"sonar.sources=User" -D"sonar.host.url=http://localhost:9000" -D"sonar.login=sqp_cfe53f4667e9c83129469f7a698d2f74f5ef73ad"

@ -1,30 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

@ -1,4 +0,0 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:color="@color/blue" />
<item android:color="@color/grey"/>
</selector>

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<shape android:shape="rectangle" >
<!-- 填充的颜色 -->
<solid android:color="@color/white"></solid>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="1dip" />
<!-- stroke 设置边框显示 -->
<!-- paddingButton里面的文字与Button边界的间隔 -->
<padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp" />
</shape>
</item>
<item android:state_pressed="true">
<shape android:shape="rectangle" >
<!-- 填充的颜色 -->
<solid android:color="@color/grey"></solid>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="1dip" />
<!-- stroke 设置边框显示 -->
<!-- paddingButton里面的文字与Button边界的间隔 -->
<padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp" />
</shape>
</item>
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

@ -1,4 +0,0 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="23dp"/> <!-- 设置圆角半径,根据需要调整数值 -->
<solid android:color="@color/white"></solid>
</shape>

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle" >
<!-- 填充的颜色 -->
<solid android:color="@color/grey"></solid>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="10dip" />
<!-- paddingButton里面的文字与Button边界的间隔 -->
<padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp" />
</shape>
</item>
<item android:state_pressed="false">
<shape android:shape="rectangle" >
<!-- 填充的颜色 -->
<solid android:color="@color/blue"></solid>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="10dip" />
<!-- stroke 设置边框显示 -->
<stroke
android:dashGap="0dp"
android:width="1dp"
android:color="@color/grey" />
<!-- paddingButton里面的文字与Button边界的间隔 -->
<padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp" />
</shape>
</item>
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z" />
</vector>

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" />
</vector>

@ -1,170 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z" />
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="-4dp"
android:right="-4dp"
android:top="-4dp">
<shape>
<stroke
android:width="3dp"
android:color="#078EFA" />
</shape>
</item>
</layer-list>

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="-4dp"
android:right="-4dp"
android:top="-4dp">
<shape>
<stroke
android:width="3dp"
android:color="#F68D2C" />
</shape>
</item>
</layer-list>

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="-4dp"
android:right="-4dp"
android:top="-4dp">
<shape android:layout_height="match_parent">
<stroke
android:width="3dp"
android:color="#3C927D" />
</shape>
</item>
</layer-list>

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="-4dp"
android:right="-4dp"
android:top="-4dp">
<shape>
<stroke
android:width="3dp"
android:color="#D92D25" />
</shape>
</item>
</layer-list>

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:top="-2dp" android:left="-2dp" android:right="-2dp" android:bottom="-24dp">
<shape
android:layout_height="match_parent"
android:shape="line">
<stroke
android:width="3dp"
android:alpha="0.8"
android:color="#78078EFA" />
</shape>
</item>
<item android:top="-16dp" android:left="-14dp" android:right="-4dp" android:bottom="-27dp">
<shape android:shape="line">
<stroke
android:width="5dp"
android:height="30dp"
android:color="#78078EFA"
android:alpha="0.6" />
</shape>
</item>
<item android:top="-16dp" android:left="-14dp" android:right="-4dp" android:bottom="-30dp">
<shape android:shape="line">
<stroke
android:width="7dp"
android:color="#78078EFA"
android:alpha="0.4" />
</shape>
</item>
</layer-list>

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:color="@color/black"
android:width="1dp"
/>
</shape>

@ -1,20 +0,0 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<!-- 填充的颜色 -->
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="1dip" />
<!-- stroke 设置边框显示 -->
<stroke
android:dashGap="0dp"
android:width="0.3dp"
android:color="@color/grey" />
<!-- paddingButton里面的文字与Button边界的间隔 -->
<padding
android:bottom="2dp"
android:left="2dp"
android:right="2dp"
android:top="2dp" />
<size
android:width="20dp"
android:height="20dp" />
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

@ -1,5 +0,0 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/image_upload" android:state_pressed="true"/>
<item android:drawable="@drawable/image_upload" android:state_focused="true"/>
<item android:drawable="@drawable/image_upload"/>
</selector>

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/nav_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:background="?android:attr/windowBackground"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/bottom_nav_menu" />
<fragment
android:id="@+id/nav_host_fragment_bottom_navigiation"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
app:defaultNavHost="true"
app:iconTint="@null"
app:layout_constraintBottom_toTopOf="@id/nav_view"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/mobile_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent">
<ImageView
android:id="@+id/show_photo"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/recapture"
android:backgroundTint="@color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="60dp"
android:src="@drawable/camera"
android:layout_marginLeft="100dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:text="重新拍摄"
/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/transmit"
android:backgroundTint="@color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="60dp"
android:background="@drawable/button"
android:src="@drawable/upload"
android:layout_marginRight="100dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:text="上传图片"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent">
<ImageView
android:id="@+id/user_confirm"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/confirm_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/user_confirm"
android:layout_marginBottom="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- <LinearLayout-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="100dp"-->
<!-- </LinearLayout>-->
<SurfaceView
android:id="@+id/surfaceView"
android:layout_width="match_parent"
android:layout_height="500dp" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/take_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/camera"
android:layout_gravity="center"
/>
</LinearLayout>

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.home.GarbageRecognitionActivity">
<com.tencent.tencentmap.mapsdk.maps.TextureMapView
android:id="@+id/mapview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/navigiation"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginBottom="50dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:src="@drawable/go"
android:backgroundTint="@color/white"
/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/check_nearby_trash_cans"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toTopOf="@id/navigiation"
app:layout_constraintRight_toRightOf="parent"
android:src="@drawable/near_trash_bin"
android:backgroundTint="@color/white"
/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/Get_Current_Location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toTopOf="@id/check_nearby_trash_cans"
app:layout_constraintRight_toRightOf="parent"
android:src="@drawable/my_location"
android:backgroundTint="@color/white"
/>
/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,124 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.home.GarbageRecognitionActivity">
<ImageButton
android:layout_marginTop="8dp"
android:id="@id/recycle"
android:layout_width="0dp"
android:layout_height="0dp"
android:src="@drawable/recycle"
android:scaleType="centerInside"
app:layout_constraintWidth_percent="0.25"
app:layout_constraintHeight_percent="0.05"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/recycle_text"
android:background="@drawable/button"
/>
<TextView
android:id="@+id/recycle_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="可回收垃圾"
app:layout_constraintStart_toStartOf="@id/recycle"
app:layout_constraintEnd_toEndOf="@id/recycle"
app:layout_constraintTop_toBottomOf="@id/recycle"
android:gravity="center" />
<ImageButton
android:layout_marginTop="8dp"
android:id="@id/kitchen_garbage"
android:src="@drawable/kitchen_garbage"
android:scaleType="centerInside"
app:layout_constraintWidth_percent="0.25"
app:layout_constraintHeight_percent="0.05"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/button"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/kitchen_text"
app:layout_constraintLeft_toRightOf="@id/recycle"/>
<TextView
android:id="@+id/kitchen_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="厨余垃圾"
app:layout_constraintStart_toStartOf="@id/kitchen_garbage"
app:layout_constraintEnd_toEndOf="@id/kitchen_garbage"
app:layout_constraintTop_toBottomOf="@id/kitchen_garbage"
android:gravity="center" />
<ImageButton
android:layout_marginTop="8dp"
app:layout_constraintWidth_percent="0.25"
app:layout_constraintHeight_percent="0.05"
android:scaleType="centerInside"
android:id="@id/other_garbage"
android:src="@drawable/other_garbage"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/button"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/other_garbage_text"
app:layout_constraintLeft_toRightOf="@id/kitchen_garbage"/>
<TextView
android:id="@+id/other_garbage_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="其他垃圾"
app:layout_constraintStart_toStartOf="@id/other_garbage"
app:layout_constraintEnd_toEndOf="@id/other_garbage"
app:layout_constraintTop_toBottomOf="@id/other_garbage"
android:gravity="center" />
<ImageButton
android:layout_marginTop="8dp"
app:layout_constraintWidth_percent="0.25"
app:layout_constraintHeight_percent="0.05"
android:scaleType="centerInside"
android:id="@id/hazardous_waste"
android:src="@drawable/hazardous_waste"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/button"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/hazardous_waste_text"
app:layout_constraintLeft_toRightOf="@id/other_garbage"/>
<TextView
android:id="@+id/hazardous_waste_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="有害垃圾"
app:layout_constraintStart_toStartOf="@id/hazardous_waste"
app:layout_constraintEnd_toEndOf="@id/hazardous_waste"
app:layout_constraintTop_toBottomOf="@id/hazardous_waste"
android:gravity="center" />
<FrameLayout
android:id="@+id/content_container"
android:layout_width="417dp"
android:layout_height="400dp"
android:layout_marginTop="16dp"
android:background="@android:color/transparent"
app:layout_constraintBottom_toTopOf="@id/capture"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/hazardous_waste_text"
app:layout_constraintVertical_bias="0.5"
app:layout_constraintVertical_chainStyle="packed" />
<ImageButton
android:id="@+id/capture"
android:layout_width="160dp"
android:layout_height="80dp"
android:layout_marginTop="40dp"
android:background="@drawable/circle_button"
android:scaleType="fitCenter"
android:src="@drawable/capture_photo"
app:layout_constraintHorizontal_bias="0.488"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/content_container"></ImageButton>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,210 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".BottomNavigiationActivity"
android:orientation="vertical"
>
<!-- 图标和文本的 LinearLayout -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_marginTop="20dp"
android:gravity="center">
<TextView
android:layout_width="400dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="用户反馈"
android:textSize="27sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:layout_marginLeft="30dp"
>
<TextView
android:layout_width="190dp"
android:layout_height="match_parent"
android:background="@drawable/text_underline4"
android:gravity="center"
android:text="请选择反馈类型:"
android:textSize="22sp"
android:textStyle="bold"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginTop="10dp"
android:gravity="center">
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/user_experience"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="用户体验"
/>
<TextView
android:layout_width="10dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/identify_deviations"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="识别偏差"
tools:ignore="DuplicateIds" />
<TextView
android:layout_width="10dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/functional_recommendations"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="功能建议"
tools:ignore="DuplicateIds" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center">
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/classification_expansion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="分类扩充"
tools:ignore="DuplicateIds" />
<TextView
android:layout_width="10dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/other_issues"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="其他问题"
tools:ignore="DuplicateIds" />
<TextView
android:layout_width="10dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/positive_recommendation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="好评推荐"
tools:ignore="DuplicateIds" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="55dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:layout_marginLeft="30dp"
>
<TextView
android:layout_width="190dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="请详细补充反馈:"
android:textSize="22sp"
android:textStyle="bold"
android:background="@drawable/text_underline4"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
>
<EditText
android:id="@+id/input_feedback"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="在此处输入反馈"
android:gravity="center"
android:maxLength="150"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="55dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:layout_marginLeft="30dp"
>
<TextView
android:layout_width="120dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="上传图片:"
android:textSize="22sp"
android:textStyle="bold"
android:background="@drawable/text_underline4"
/>
<!--替换图片-->
</LinearLayout>
<!-- 此处添加图片-->
<ImageButton
android:id="@+id/btn_select_image"
android:layout_width="70dp"
android:layout_height="70dp"
android:background="@drawable/your_image"
android:text="选择图片"
android:layout_marginLeft="30dp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center">
<Button
android:id="@+id/submit"
android:layout_width="90dp"
android:layout_height="60dp"
android:text="提交"
tools:ignore="DuplicateIds" />
<TextView
android:layout_width="20dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold" />
<Button
android:id="@+id/reset"
android:layout_width="90dp"
android:layout_height="60dp"
android:text="重置"
tools:ignore="DuplicateIds" />
</LinearLayout>
</LinearLayout>

@ -1,156 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".BottomNavigiationActivity"
android:orientation="vertical"
android:background="@color/grey1">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_marginTop="15dp"
android:gravity="center">
<TextView
android:layout_width="400dp"
android:layout_height="match_parent"
android:gravity="center"
android:text="垃圾知识问答"
android:textSize="27sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/question"
android:layout_width="360dp"
android:layout_height="80dp"
android:layout_marginLeft="30dp"
android:paddingLeft="10dp"
android:textSize="16sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/analysisTextView"
android:layout_width="360dp"
android:layout_height="190dp"
android:layout_marginLeft="30dp"
android:paddingLeft="10dp"
android:textSize="16sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:gravity="center">
<Button
android:textColor="@color/black"
android:backgroundTint="@color/white"
android:id="@+id/a_option"
android:layout_width="155dp"
android:layout_height="125dp"
android:textSize="16sp"
tools:ignore="DuplicateIds" />
<TextView
android:layout_width="40dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold" />
<Button
android:textColor="@color/black"
android:backgroundTint="@color/white"
android:id="@+id/b_option"
android:layout_width="155dp"
android:layout_height="125dp"
android:textSize="16sp"
tools:ignore="DuplicateIds" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:gravity="center">
<Button
android:textColor="@color/black"
android:backgroundTint="@color/white"
android:id="@+id/c_option"
android:layout_width="155dp"
android:layout_height="125dp"
android:textSize="16sp"
tools:ignore="DuplicateIds" />
<TextView
android:layout_width="40dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold" />
<Button
android:textColor="@color/black"
android:id="@+id/d_option"
android:layout_width="155dp"
android:layout_height="125dp"
android:backgroundTint="@color/white"
android:textSize="16sp"
tools:ignore="DuplicateIds" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:gravity="center"
>
<ImageButton
android:id="@+id/pre_question"
android:layout_width="45dp"
android:layout_height="45dp"
android:background="@drawable/previous_question"
tools:ignore="DuplicateIds" />
<TextView
android:layout_width="50dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold" />
<ImageButton
android:id="@+id/next_question"
android:layout_width="45dp"
android:layout_height="45dp"
android:background="@drawable/next_question"
tools:ignore="DuplicateIds" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

@ -1,73 +0,0 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.Buttonfragments.RecycleGarbageFragment">
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/hazard"
android:adjustViewBounds="true" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 有害垃圾 "
android:background="@drawable/text_underline3"
style="@style/font_styles"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
app:layout_constraintLeft_toLeftOf="parent"
android:textAppearance="@style/Textstyle3"/>
<TextView
android:layout_width="370dp"
android:layout_height="wrap_content"
android:maxLines="4"
android:minLines="1"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="有害垃圾,指生活垃圾中对人体健康或自然环境造成直接或潜在危害的物质,必须单独收集、运输、存贮。主要包括废灯管杀虫剂、过期药品、废电池、废水银温度计等。"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
style="@style/font_wr"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:layout_marginTop="100dp"
android:text=" 有害垃圾投放要求 "
android:background="@drawable/text_underline3"
style="@style/font_styles"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
android:textAppearance="@style/Textstyle3"/>
<TextView
android:layout_width="370dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="120dp"
android:color="#078EFA"
android:text="
o应保证器物完整避免二次污染。\n
o如有残留请密闭后投放。\n
o易破损的物品请连带包装或将其包裹后投放。\n
o易挥发的物品请密封后投放。
"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,72 +0,0 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.Buttonfragments.RecycleGarbageFragment">
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/kitchen"
android:adjustViewBounds="true" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 厨余垃圾 "
android:background="@drawable/text_underline2"
style="@style/font_styles"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
app:layout_constraintLeft_toLeftOf="parent"
android:textAppearance="@style/Textstyle4"/>
<TextView
android:layout_width="370dp"
android:layout_height="wrap_content"
android:maxLines="4"
android:minLines="1"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="厨余垃圾是指居民日常生活及食品加工、饮食服务等活动中产生的垃圾,包括丢弃不用的菜叶、剩饭、果皮、茶渣、骨头(鸡骨、鱼刺类)等."
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
style="@style/font_wr"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:layout_marginTop="90dp"
android:text=" 厨余垃圾投放要求 "
android:background="@drawable/text_underline2"
style="@style/font_styles"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
android:textAppearance="@style/Textstyle4"/>
<TextView
android:layout_width="370dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="110dp"
android:color="#078EFA"
android:text="
o厨余垃圾应从产生时就与其他品类垃圾分开并在投放前沥干水分。\n
o保证厨余垃圾分出质量需做到“无玻璃陶瓷、无金属、无塑料橡胶”等其他杂物掺杂。\n
o有包装物的过期食品应将包装物去除后分类投放包装物请投放到对应的可回收物或者其他垃圾收集容器。
"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,16 +0,0 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:background="#F0F2F1"
>
<ImageView
android:layout_width="300dp"
android:layout_height="300dp"
android:src="@drawable/launch_logo"
android:background="#F0F2F1"
/>
</LinearLayout>

@ -1,74 +0,0 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.Buttonfragments.RecycleGarbageFragment">
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/other"
android:adjustViewBounds="true" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 其他垃圾 "
android:background="@drawable/text_underline1"
style="@style/font_styles"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
app:layout_constraintLeft_toLeftOf="parent"
android:textAppearance="@style/Textstyle2"/>
<TextView
android:layout_width="370dp"
android:layout_height="wrap_content"
android:maxLines="4"
android:minLines="1"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="其他垃圾指危害比较小,没有再次利用的价值的垃圾,如建筑垃圾,生活垃圾等,一般都采取填埋、焚烧、卫生分解等方法处理,部分还可以使用生物分解的方法解决,如放蚯蚓等。"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
style="@style/font_wr"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:layout_marginTop="100dp"
android:text=" 其他垃圾投放要求 "
android:background="@drawable/text_underline1"
style="@style/font_styles"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
android:textAppearance="@style/Textstyle2"/>
<TextView
android:layout_width="370dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="120dp"
android:color="#078EFA"
android:text="
o沥干水分后投放\n
o放入指定垃圾桶\n
o将包装物与垃圾内容物分开处理\n
o对于无法确定分类的垃圾咨询当地的垃圾回收管理部门"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,76 +0,0 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.Buttonfragments.RecycleGarbageFragment">
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/recycle_garbage"
android:adjustViewBounds="true" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 可回收垃圾 "
android:background="@drawable/text_underline"
style="@style/font_styles"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
app:layout_constraintLeft_toLeftOf="parent"
android:textAppearance="@style/Textstyle1"/>
<TextView
android:layout_width="370dp"
android:layout_height="wrap_content"
android:maxLines="4"
android:minLines="1"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="可回收物就是再生资源,指生活垃圾中未经污染、适宜回收循环利用的废物。主要包括废弃电器电子产品、废纸张、废塑料、废玻璃、废金属等五类"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
style="@style/font_wr"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:layout_marginTop="90dp"
android:text=" 可回收物投放要求 "
android:background="@drawable/text_underline"
style="@style/font_styles"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout"
android:textAppearance="@style/Textstyle1"/>
<TextView
android:layout_width="370dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="110dp"
android:color="#078EFA"
android:text="
o轻投轻放\n
o清洁干燥避免污染。\n
o废纸尽量平整 。\n
o立体包装物请清空内容物清洁后压扁投放。\n
o有尖锐边角的应包裹后投放。
"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,96 +0,0 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.Buttonfragments.RecycleGarbageFragment"
>
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/hazard" />
</FrameLayout>
<ImageView
android:layout_marginTop="50dp"
android:id="@+id/picture"
android:layout_width="155dp"
android:layout_height="167dp"
android:adjustViewBounds="true"
android:src="@drawable/image_upload"
app:layout_constraintTop_toBottomOf="@id/frameLayout"
app:layout_constraintLeft_toLeftOf="parent"
/>
<ImageView
android:id="@+id/reque"
android:layout_width="155dp"
android:layout_height="167dp"
android:adjustViewBounds="true"
android:layout_marginTop="50dp"
android:src="@drawable/resultofhazardous"
app:layout_constraintHorizontal_bias="0.917"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/picture"
app:layout_constraintVertical_bias="0.507" />
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 有害垃圾 "
android:background="@drawable/text_underline3"
style="@style/font_styles"
app:layout_constraintTop_toTopOf="@+id/picture"
app:layout_constraintLeft_toRightOf="@id/picture"
android:textAppearance="@style/Textstyle3"/>
<TextView
style="@style/font_wr"
android:layout_width="260dp"
android:layout_height="130dp"
android:layout_marginTop="16dp"
android:maxLines="7"
android:minLines="1"
android:text="有害垃圾,指生活垃圾中对人体健康或自然环境造成直接或潜在危害的物质,必须单独收集、运输、存贮。主要包括废灯管杀虫剂、过期药品、废电池、废水银温度计等"
app:layout_constraintLeft_toRightOf="@id/picture"
app:layout_constraintTop_toBottomOf="@+id/text1" />
<TextView
android:id="@+id/request"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:text=" 有害垃圾投放要求 "
android:background="@drawable/text_underline3"
style="@style/font_styles"
app:layout_constraintLeft_toRightOf="@id/reque"
app:layout_constraintTop_toTopOf="@+id/reque"
android:textAppearance="@style/Textstyle3"
/>
<TextView
android:layout_width="260dp"
android:layout_height="wrap_content"
android:color="#078EFA"
android:text="
o应保证器物完整避免二次污染。\n
o如有残留请密闭后投放。\n
o易破损的物品请连带包装或将其包裹后投放。\n
o易挥发的物品请密封后投放。
"
app:layout_constraintLeft_toRightOf="@id/reque"
app:layout_constraintTop_toBottomOf="@+id/request" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,96 +0,0 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.Buttonfragments.RecycleGarbageFragment"
>
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/kitchen" />
</FrameLayout>
<ImageView
android:layout_marginTop="50dp"
android:id="@+id/picture"
android:layout_width="155dp"
android:layout_height="167dp"
android:adjustViewBounds="true"
android:src="@drawable/image_upload"
app:layout_constraintTop_toBottomOf="@id/frameLayout"
app:layout_constraintLeft_toLeftOf="parent"
/>
<ImageView
android:id="@+id/reque"
android:layout_width="155dp"
android:layout_height="167dp"
android:adjustViewBounds="true"
android:layout_marginTop="50dp"
android:src="@drawable/resultofkitchen"
app:layout_constraintHorizontal_bias="0.917"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/picture"
app:layout_constraintVertical_bias="0.507" />
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 厨余垃圾 "
android:background="@drawable/text_underline2"
style="@style/font_styles"
app:layout_constraintTop_toTopOf="@+id/picture"
app:layout_constraintLeft_toRightOf="@id/picture"
android:textAppearance="@style/Textstyle4"/>
<TextView
style="@style/font_wr"
android:layout_width="260dp"
android:layout_height="130dp"
android:layout_marginTop="16dp"
android:maxLines="4"
android:minLines="1"
android:text="厨余垃圾是指居民日常生活及食品加工、饮食服务等活动中产生的垃圾,包括丢弃不用的菜叶、剩饭、果皮、茶渣、骨头(鸡骨、鱼刺类)等."
app:layout_constraintLeft_toRightOf="@id/picture"
app:layout_constraintTop_toBottomOf="@+id/text1" />
<TextView
android:id="@+id/request"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:text=" 厨余垃圾投放要求 "
android:background="@drawable/text_underline2"
style="@style/font_styles"
app:layout_constraintLeft_toRightOf="@id/reque"
app:layout_constraintTop_toTopOf="@+id/reque"
android:textAppearance="@style/Textstyle4"
/>
<TextView
android:layout_width="260dp"
android:layout_height="wrap_content"
android:color="#078EFA"
android:text="
o厨余垃圾应从产生时就与其他品类垃圾分开并在投放前沥干水分。\n
o保证厨余垃圾分出质量需做到“无玻璃陶瓷、无金属、无塑料橡胶”等其他杂物掺杂。\n
o有包装物的过期食品应将包装物去除后分类投放包装物请投放到对应的可回收物或者其他垃圾收集容器。
"
app:layout_constraintLeft_toRightOf="@id/reque"
app:layout_constraintTop_toBottomOf="@+id/request" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,97 +0,0 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.Buttonfragments.RecycleGarbageFragment"
>
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/other" />
</FrameLayout>
<ImageView
android:layout_marginTop="50dp"
android:id="@+id/picture"
android:layout_width="155dp"
android:layout_height="167dp"
android:adjustViewBounds="true"
android:src="@drawable/image_upload"
app:layout_constraintTop_toBottomOf="@id/frameLayout"
app:layout_constraintLeft_toLeftOf="parent"
/>
<ImageView
android:id="@+id/reque"
android:layout_width="155dp"
android:layout_height="167dp"
android:adjustViewBounds="true"
android:layout_marginTop="50dp"
android:src="@drawable/resultofother"
app:layout_constraintHorizontal_bias="0.917"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/picture"
app:layout_constraintVertical_bias="0.507" />
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 其他垃圾 "
android:background="@drawable/text_underline1"
style="@style/font_styles"
app:layout_constraintTop_toTopOf="@+id/picture"
app:layout_constraintLeft_toRightOf="@id/picture"
android:textAppearance="@style/Textstyle2"/>
<TextView
style="@style/font_wr"
android:layout_width="260dp"
android:layout_height="130dp"
android:layout_marginTop="16dp"
android:maxLines="7"
android:minLines="1"
android:text="其他垃圾指危害比较小,没有再次利用的价值的垃圾,如建筑垃圾,生活垃圾等,一般都采取填埋、焚烧、卫生分解等方法处理,部分还可以使用生物分解的方法解决,如放蚯蚓等"
app:layout_constraintLeft_toRightOf="@id/picture"
app:layout_constraintTop_toBottomOf="@+id/text1" />
<TextView
android:id="@+id/request"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:text=" 其他垃圾投放要求 "
android:background="@drawable/text_underline1"
style="@style/font_styles"
app:layout_constraintLeft_toRightOf="@id/reque"
app:layout_constraintTop_toTopOf="@+id/reque"
android:textAppearance="@style/Textstyle2"
/>
<TextView
android:layout_width="260dp"
android:layout_height="wrap_content"
android:color="#078EFA"
android:text="
o沥干水分后投放\n
o放入指定垃圾桶\n
o将包装物与垃圾内容物分开处理\n
o对于无法确定分类的垃圾咨询当地的垃圾回收管理部门
"
app:layout_constraintLeft_toRightOf="@id/reque"
app:layout_constraintTop_toBottomOf="@+id/request" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,97 +0,0 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.Buttonfragments.RecycleGarbageFragment">
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/recycle_garbage" />
</FrameLayout>
<ImageView
android:layout_marginTop="50dp"
android:id="@+id/picture"
android:layout_width="155dp"
android:layout_height="167dp"
android:adjustViewBounds="true"
android:src="@drawable/image_upload"
app:layout_constraintTop_toBottomOf="@id/frameLayout"
app:layout_constraintLeft_toLeftOf="parent"
/>
<ImageView
android:id="@+id/reque"
android:layout_width="155dp"
android:layout_height="167dp"
android:adjustViewBounds="true"
android:layout_marginTop="50dp"
android:src="@drawable/resultofrecycle"
app:layout_constraintHorizontal_bias="0.917"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/picture"
app:layout_constraintVertical_bias="0.507" />
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" 可回收垃圾 "
android:background="@drawable/text_underline2"
style="@style/font_styles"
app:layout_constraintTop_toTopOf="@+id/picture"
app:layout_constraintLeft_toRightOf="@id/picture"
android:textAppearance="@style/Textstyle1"/>
<TextView
style="@style/font_wr"
android:layout_width="260dp"
android:layout_height="130dp"
android:layout_marginTop="16dp"
android:maxLines="4"
android:minLines="1"
android:text="可回收物就是再生资源,指生活垃圾中未经污染、适宜回收循环利用的废物。主要包括废弃电器电子产品、废纸张、废塑料、废玻璃、废金属等五类"
app:layout_constraintLeft_toRightOf="@id/picture"
app:layout_constraintTop_toBottomOf="@+id/text1" />
<TextView
android:id="@+id/request"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:text=" 可回收物投放要求 "
android:background="@drawable/text_underline2"
style="@style/font_styles"
app:layout_constraintLeft_toRightOf="@id/reque"
app:layout_constraintTop_toTopOf="@+id/reque"
android:textAppearance="@style/Textstyle1"/>
<TextView
android:layout_width="260dp"
android:layout_height="wrap_content"
android:color="#078EFA"
android:text="
o轻投轻放\n
o清洁干燥避免污染。\n
o废纸尽量平整 。\n
o立体包装物请清空内容物清洁后压扁投放。\n
o有尖锐边角的应包裹后投放。"
app:layout_constraintLeft_toRightOf="@id/reque"
app:layout_constraintTop_toBottomOf="@+id/request" />
</androidx.constraintlayout.widget.ConstraintLayout>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save