main
LiuRuiXuan 2 years ago
parent 1003aaa8fb
commit 37b19503ed

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="testRunner" value="PLATFORM" /> <option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings> </GradleProjectSettings>
</option> </option>
</component> </component>

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="11" project-jdk-type="JavaSDK"> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" /> <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component> </component>
</project> </project>

@ -1,5 +1,6 @@
plugins { plugins {
id 'com.android.application' id 'com.android.application'
id "org.sonarqube" version "3.5.0.2730"
} }
android { android {
@ -8,7 +9,7 @@ android {
defaultConfig { defaultConfig {
applicationId "com.example.myapplication" applicationId "com.example.myapplication"
minSdk 24 minSdk 26
targetSdk 33 targetSdk 33
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
@ -29,18 +30,41 @@ android {
buildFeatures { buildFeatures {
viewBinding true viewBinding true
} }
sourceSets{
main {
//jnilibsso
jniLibs.srcDirs = ['libs']
assets.srcDirs+=['src/main/com.example.myapplication/raw']
}
}
} }
dependencies { dependencies {
// implementation 'com.tencent.map:tencent-map-vector-sdk:4.3.5'
// implementation 'com.tencent.map.geolocation:TencentLocationSdk-openplatform:8.7.5.1'
implementation 'com.github.JediBurrell:customFloatingActionButton:-SNAPSHOT'
implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.tencent.map:tencent-map-nav-sdk:5.4.6.0'
implementation 'com.google.android.material:material:1.5.0' implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3' implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1' implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
implementation 'androidx.navigation:navigation-fragment:2.4.1' implementation 'androidx.navigation:navigation-fragment:2.4.1'
implementation 'androidx.navigation:navigation-ui:2.4.1' implementation 'androidx.navigation:navigation-ui:2.4.1'
implementation files('libs\\tencent-mapsdk-android-official-release.5.2.1.18c8cd09.jar')
implementation files('libs\\poi-3.12-android-a.jar')
implementation files('libs\\poi-ooxml-schemas-3.12-20150511-a.jar')
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
} }

@ -4,5 +4,5 @@
# Location of the SDK. This is only used by Gradle. # Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the # For customization when using a Version Control System, please read the
# header note. # header note.
#Mon Sep 25 09:53:48 CST 2023 #Fri Sep 29 04:34:54 CST 2023
sdk.dir=E\:\\Android_SDK sdk.dir=F\:\\AndroidSDK\\AndroidSDK

@ -1,8 +1,39 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> 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 <application
android:requestLegacyExternalStorage="true"
android:allowBackup="true" android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules" android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules" android:fullBackupContent="@xml/backup_rules"
@ -11,15 +42,39 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.MyApplication" android:theme="@style/Theme.MyApplication"
tools:targetApi="31"> tools:targetApi="31">
<activity <provider
android:name=".BottomNavigiationActivity" android:name="androidx.core.content.FileProvider"
android:exported="true" android:authorities="${applicationId}.fileprovider"
android:label="@string/title_activity_bottom_navigiation"> 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> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </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> </application>
</manifest> </manifest>

@ -3,6 +3,7 @@ package com.example.myapplication;
import android.media.Image; import android.media.Image;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
@ -11,6 +12,7 @@ import android.widget.ImageButton;
import com.example.myapplication.ui.Buttonfragments.RecycleGarbageFragment; import com.example.myapplication.ui.Buttonfragments.RecycleGarbageFragment;
import com.google.android.material.bottomnavigation.BottomNavigationView; import com.google.android.material.bottomnavigation.BottomNavigationView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.navigation.NavController; import androidx.navigation.NavController;
@ -19,6 +21,7 @@ import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI; import androidx.navigation.ui.NavigationUI;
import com.example.myapplication.databinding.BottomNavigiationBinding; import com.example.myapplication.databinding.BottomNavigiationBinding;
import com.google.android.material.bottomnavigation.LabelVisibilityMode;
import java.util.List; import java.util.List;
@ -28,18 +31,16 @@ public class BottomNavigiationActivity extends AppCompatActivity{
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
// Log.d("wc","create");
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
binding = BottomNavigiationBinding.inflate(getLayoutInflater()); binding = BottomNavigiationBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot()); setContentView(binding.getRoot());
this.getSupportActionBar().hide();
BottomNavigationView navView = findViewById(R.id.nav_view); BottomNavigationView navView = findViewById(R.id.nav_view);
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder( AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
R.id.navigation_home, R.id.navigation_dashboard, R.id.navigation_notifications) R.id.navigation_home, R.id.navigation_dashboard, R.id.navigation_notifications,R.id.navigation_quiz)
.build(); .build();
navView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED);
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_bottom_navigiation); NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_bottom_navigiation);
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
NavigationUI.setupWithNavController(binding.navView, navController); NavigationUI.setupWithNavController(binding.navView, navController);
} }
} }

@ -9,7 +9,7 @@ import androidx.fragment.app.Fragment;
import com.example.myapplication.R; import com.example.myapplication.R;
public class HazardGarbageFragment extends Fragment { public class HazardGarbageFragment extends Fragment {//有害垃圾介绍
public HazardGarbageFragment() { public HazardGarbageFragment() {
// Required empty public constructor // Required empty public constructor

@ -9,7 +9,7 @@ import androidx.fragment.app.Fragment;
import com.example.myapplication.R; import com.example.myapplication.R;
public class KitchenGarbageFragment extends Fragment { public class KitchenGarbageFragment extends Fragment {//厨余垃圾介绍
public KitchenGarbageFragment() { public KitchenGarbageFragment() {
// Required empty public constructor // Required empty public constructor

@ -9,7 +9,7 @@ import androidx.fragment.app.Fragment;
import com.example.myapplication.R; import com.example.myapplication.R;
public class OtherGarbageFragment extends Fragment { public class OtherGarbageFragment extends Fragment {//其他垃圾介绍
public OtherGarbageFragment() { public OtherGarbageFragment() {
// Required empty public constructor // Required empty public constructor

@ -9,12 +9,11 @@ import androidx.fragment.app.Fragment;
import com.example.myapplication.R; import com.example.myapplication.R;
public class RecycleGarbageFragment extends Fragment { public class RecycleGarbageFragment extends Fragment {//可回收垃圾介绍
public RecycleGarbageFragment() { public RecycleGarbageFragment() {
// Required empty public constructor // Required empty public constructor
} }
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {

@ -1,8 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"> <item android:state_pressed="false">
<color android:color="@color/grey" /> <!-- 点击时的背景颜色 --> <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>
<item> <item android:state_pressed="true">
<color android:color="#FFFFFF" /> <!-- 默认状态下的背景颜色 --> <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> </item>
</selector> </selector>

@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container" android:id="@+id/container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:paddingTop="?attr/actionBarSize">
<com.google.android.material.bottomnavigation.BottomNavigationView <com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/nav_view" android:id="@+id/nav_view"
@ -22,7 +21,7 @@
android:id="@+id/nav_host_fragment_bottom_navigiation" android:id="@+id/nav_host_fragment_bottom_navigiation"
android:name="androidx.navigation.fragment.NavHostFragment" android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="0dp"
app:defaultNavHost="true" app:defaultNavHost="true"
app:iconTint="@null" app:iconTint="@null"
app:layout_constraintBottom_toTopOf="@id/nav_view" app:layout_constraintBottom_toTopOf="@id/nav_view"

@ -1,96 +1,47 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".BottomNavigiationActivity" tools:context=".ui.home.GarbageRecognitionActivity">
android:orientation="vertical"> <com.tencent.tencentmap.mapsdk.maps.TextureMapView
android:id="@+id/mapview"
<!-- 图标和文本的 LinearLayout -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_marginTop="30dp"
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="400dp"
android:layout_height="400dp"
android:layout_marginTop="10dp"
android:gravity="center">
<EditText
android:id="@+id/edittext"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"/>
android:gravity="center" <com.google.android.material.floatingactionbutton.FloatingActionButton
android:hint="在此处插入地图" /> android:id="@+id/navigiation"
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_marginTop="10dp"
android:gravity="center">
<TextView
android:layout_width="140dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold" />
<Button
android:id="@+id/Get_Current_Location"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="获取当前位置"
android:gravity="center"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="60dp" android:layout_marginBottom="50dp"
android:layout_marginTop="10dp" app:layout_constraintBottom_toBottomOf="parent"
android:gravity="center"> app:layout_constraintRight_toRightOf="parent"
android:src="@drawable/go"
<TextView android:backgroundTint="@color/white"
android:layout_width="140dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold"
/> />
<Button
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/check_nearby_trash_cans" android:id="@+id/check_nearby_trash_cans"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="查看附近垃圾桶"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="60dp" android:layout_marginBottom="10dp"
android:layout_marginTop="10dp" app:layout_constraintBottom_toTopOf="@id/navigiation"
android:gravity="center"> app:layout_constraintRight_toRightOf="parent"
android:src="@drawable/near_trash_bin"
android:backgroundTint="@color/white"
/>
<TextView <com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="160dp" android:id="@+id/Get_Current_Location"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:textStyle="bold" />
<Button
android:id="@+id/navigation"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="导航" 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"
/> />
</LinearLayout>
</LinearLayout> />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -4,15 +4,16 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".ui.home.HomeFragment"> tools:context=".ui.home.GarbageRecognitionActivity">
<ImageButton <ImageButton
android:layout_marginTop="8dp"
android:id="@id/recycle" android:id="@id/recycle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:src="@drawable/recycle" android:src="@drawable/recycle"
android:scaleType="centerInside" android:scaleType="centerInside"
app:layout_constraintWidth_percent="0.25" app:layout_constraintWidth_percent="0.25"
app:layout_constraintHeight_percent="0.10" app:layout_constraintHeight_percent="0.05"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/recycle_text" app:layout_constraintBottom_toTopOf="@id/recycle_text"
@ -28,14 +29,15 @@
app:layout_constraintTop_toBottomOf="@id/recycle" app:layout_constraintTop_toBottomOf="@id/recycle"
android:gravity="center" /> android:gravity="center" />
<ImageButton <ImageButton
android:layout_marginTop="8dp"
android:id="@id/kitchen_garbage" android:id="@id/kitchen_garbage"
android:src="@drawable/kitchen_garbage" android:src="@drawable/kitchen_garbage"
android:scaleType="centerInside" android:scaleType="centerInside"
app:layout_constraintWidth_percent="0.25" app:layout_constraintWidth_percent="0.25"
app:layout_constraintHeight_percent="0.10" app:layout_constraintHeight_percent="0.05"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@color/white" android:background="@drawable/button"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/kitchen_text" app:layout_constraintBottom_toTopOf="@id/kitchen_text"
app:layout_constraintLeft_toRightOf="@id/recycle"/> app:layout_constraintLeft_toRightOf="@id/recycle"/>
@ -49,14 +51,15 @@
app:layout_constraintTop_toBottomOf="@id/kitchen_garbage" app:layout_constraintTop_toBottomOf="@id/kitchen_garbage"
android:gravity="center" /> android:gravity="center" />
<ImageButton <ImageButton
android:layout_marginTop="8dp"
app:layout_constraintWidth_percent="0.25" app:layout_constraintWidth_percent="0.25"
app:layout_constraintHeight_percent="0.10" app:layout_constraintHeight_percent="0.05"
android:scaleType="centerInside" android:scaleType="centerInside"
android:id="@id/other_garbage" android:id="@id/other_garbage"
android:src="@drawable/other_garbage" android:src="@drawable/other_garbage"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@color/white" android:background="@drawable/button"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/other_garbage_text" app:layout_constraintBottom_toTopOf="@id/other_garbage_text"
app:layout_constraintLeft_toRightOf="@id/kitchen_garbage"/> app:layout_constraintLeft_toRightOf="@id/kitchen_garbage"/>
@ -70,14 +73,15 @@
app:layout_constraintTop_toBottomOf="@id/other_garbage" app:layout_constraintTop_toBottomOf="@id/other_garbage"
android:gravity="center" /> android:gravity="center" />
<ImageButton <ImageButton
android:layout_marginTop="8dp"
app:layout_constraintWidth_percent="0.25" app:layout_constraintWidth_percent="0.25"
app:layout_constraintHeight_percent="0.10" app:layout_constraintHeight_percent="0.05"
android:scaleType="centerInside" android:scaleType="centerInside"
android:id="@id/hazardous_waste" android:id="@id/hazardous_waste"
android:src="@drawable/hazardous_waste" android:src="@drawable/hazardous_waste"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@color/white" android:background="@drawable/button"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/hazardous_waste_text" app:layout_constraintBottom_toTopOf="@id/hazardous_waste_text"
app:layout_constraintLeft_toRightOf="@id/other_garbage"/> app:layout_constraintLeft_toRightOf="@id/other_garbage"/>
@ -93,11 +97,28 @@
<FrameLayout <FrameLayout
android:id="@+id/content_container" android:id="@+id/content_container"
android:layout_width="408dp" android:layout_width="417dp"
android:layout_height="575dp" android:layout_height="400dp"
android:layout_marginTop="16dp"
android:background="@android:color/transparent" android:background="@android:color/transparent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toTopOf="@id/capture"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/hazardous_waste_text" /> 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> </androidx.constraintlayout.widget.ConstraintLayout>

@ -4,7 +4,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".BottomNavigiationActivity" tools:context=".BottomNavigiationActivity"
android:orientation="vertical"> android:orientation="vertical"
>
<!-- 图标和文本的 LinearLayout --> <!-- 图标和文本的 LinearLayout -->
<LinearLayout <LinearLayout
@ -25,14 +26,20 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:gravity="center"> android:gravity="center"
android:layout_marginLeft="30dp"
>
<TextView <TextView
android:layout_width="240dp" android:layout_width="190dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/text_underline4"
android:gravity="center" android:gravity="center"
android:text="请选择反馈类型:" android:text="请选择反馈类型:"
android:textSize="22sp" android:textSize="22sp"
android:textStyle="bold" /> android:textStyle="bold"
/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -40,7 +47,7 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:gravity="center"> android:gravity="center">
<Button <com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/user_experience" android:id="@+id/user_experience"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -52,7 +59,7 @@
android:gravity="center" android:gravity="center"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" /> android:textStyle="bold" />
<Button <com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/identify_deviations" android:id="@+id/identify_deviations"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -64,7 +71,7 @@
android:gravity="center" android:gravity="center"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" /> android:textStyle="bold" />
<Button <com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/functional_recommendations" android:id="@+id/functional_recommendations"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -78,7 +85,7 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:gravity="center"> android:gravity="center">
<Button <com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/classification_expansion" android:id="@+id/classification_expansion"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -90,7 +97,7 @@
android:gravity="center" android:gravity="center"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" /> android:textStyle="bold" />
<Button <com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/other_issues" android:id="@+id/other_issues"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -102,7 +109,7 @@
android:gravity="center" android:gravity="center"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" /> android:textStyle="bold" />
<Button <com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/positive_recommendation" android:id="@+id/positive_recommendation"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -113,20 +120,27 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="55dp" android:layout_height="55dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:gravity="center"> android:gravity="center"
android:layout_marginLeft="30dp"
>
<TextView <TextView
android:layout_width="240dp" android:layout_width="190dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
android:text="请详细补充反馈:" android:text="请详细补充反馈:"
android:textSize="20sp" android:textSize="22sp"
android:textStyle="bold" /> android:textStyle="bold"
android:background="@drawable/text_underline4"
/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="120dp" android:layout_height="120dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:gravity="center"> android:gravity="center"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
>
<EditText <EditText
android:id="@+id/input_feedback" android:id="@+id/input_feedback"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -140,27 +154,32 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="55dp" android:layout_height="55dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:gravity="center"> android:gravity="center"
android:layout_marginLeft="30dp"
>
<TextView <TextView
android:layout_width="180dp" android:layout_width="120dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
android:text="上传图片:" android:text="上传图片:"
android:textSize="20sp" android:textSize="22sp"
android:textStyle="bold" /> android:textStyle="bold"
android:background="@drawable/text_underline4"
/>
<!--替换图片--> <!--替换图片-->
</LinearLayout> </LinearLayout>
<!-- 此处添加图片--> <!-- 此处添加图片-->
<Button <ImageButton
android:id="@+id/btn_select_image" android:id="@+id/btn_select_image"
android:layout_width="70dp" android:layout_width="70dp"
android:layout_height="70dp" android:layout_height="70dp"
android:background="@drawable/your_image" android:background="@drawable/your_image"
android:text="选择图片" android:text="选择图片"
android:layout_marginLeft="30dp"
/> />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -181,10 +200,10 @@
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" /> android:textStyle="bold" />
<Button <Button
android:id="@+id/cancel" android:id="@+id/reset"
android:layout_width="90dp" android:layout_width="90dp"
android:layout_height="60dp" android:layout_height="60dp"
android:text="取消" android:text="重置"
tools:ignore="DuplicateIds" /> tools:ignore="DuplicateIds" />
</LinearLayout> </LinearLayout>

@ -26,12 +26,48 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="有害垃圾,指生活垃圾中对人体健康或自然环境造成直接或潜在危害的物质,必须单独收集、运输、存贮。主要包括废灯管杀虫剂、过期药品、废电池、废水银温度计等。\n android:text=" 有害垃圾 "
有害垃圾投放要求:\n 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如有残留请密闭后投放。\n
o易破损的物品请连带包装或将其包裹后投放。\n o易破损的物品请连带包装或将其包裹后投放。\n
o易挥发的物品请密封后投放。" o易挥发的物品请密封后投放。
app:layout_constraintTop_toBottomOf="@+id/frameLayout" "
app:layout_constraintLeft_toLeftOf="parent"/> app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -22,15 +22,51 @@
android:adjustViewBounds="true" /> android:adjustViewBounds="true" />
</FrameLayout> </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 <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="厨余垃圾是指居民日常生活及食品加工、饮食服务等活动中产生的垃圾,包括丢弃不用的菜叶、剩饭、果皮、茶渣、骨头(鸡骨、鱼刺类)等。\n android:layout_marginLeft="0dp"
厨余垃圾投放要求:\n 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保证厨余垃圾分出质量需做到“无玻璃陶瓷、无金属、无塑料橡胶”等其他杂物掺杂。\n o保证厨余垃圾分出质量需做到“无玻璃陶瓷、无金属、无塑料橡胶”等其他杂物掺杂。\n
o有包装物的过期食品应将包装物去除后分类投放包装物请投放到对应的可回收物或者其他垃圾收集容器。" o有包装物的过期食品应将包装物去除后分类投放包装物请投放到对应的可回收物或者其他垃圾收集容器。
app:layout_constraintTop_toBottomOf="@+id/frameLayout" "
app:layout_constraintLeft_toLeftOf="parent"/>
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -23,12 +23,52 @@
</FrameLayout> </FrameLayout>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="其他垃圾指危害比较小,没有再次利用的价值的垃圾,如建筑垃圾,生活垃圾等,一般都采取填埋、焚烧、卫生分解等方法处理,部分还可以使用生物分解的方法解决,如放蚯蚓等。\n android:text=" 其他垃圾 "
其他垃圾投放要求:\n android:background="@drawable/text_underline1"
o沥干水分后投放。" style="@style/font_styles"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" app:layout_constraintTop_toBottomOf="@+id/frameLayout"
app:layout_constraintLeft_toLeftOf="parent"/> 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> </androidx.constraintlayout.widget.ConstraintLayout>

@ -23,15 +23,54 @@
</FrameLayout> </FrameLayout>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="可回收物就是再生资源,指生活垃圾中未经污染、适宜回收循环利用的废物。 android:text=" 可回收垃圾 "
主要包括废弃电器电子产品、废纸张、废塑料、废玻璃、废金属等五类\no轻投轻放\n 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废纸尽量平整 。\n
o立体包装物请清空内容物清洁后压扁投放。\n o立体包装物请清空内容物清洁后压扁投放。\n
o有尖锐边角的应包裹后投放。" o有尖锐边角的应包裹后投放。
app:layout_constraintTop_toBottomOf="@+id/frameLayout" "
app:layout_constraintLeft_toLeftOf="parent"/>
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -18,5 +18,10 @@
android:iconTint="@null" android:iconTint="@null"
android:icon="@drawable/user_feed_back" android:icon="@drawable/user_feed_back"
android:title="@string/user_feedback" /> android:title="@string/user_feedback" />
<item
android:id="@+id/navigation_quiz"
android:icon="@drawable/garbage_quiz"
android:iconTint="@null"
android:title="知识竞答"/>
</menu> </menu>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" /> <background android:drawable="@drawable/ic" />
<foreground android:drawable="@drawable/ic_launcher_foreground" /> <foreground android:drawable="@drawable/ic" />
</adaptive-icon> </adaptive-icon>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" /> <background android:drawable="@drawable/ic" />
<foreground android:drawable="@drawable/ic_launcher_foreground" /> <foreground android:drawable="@drawable/ic" />
</adaptive-icon> </adaptive-icon>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" /> <background android:drawable="@drawable/ic" />
<foreground android:drawable="@drawable/ic_launcher_foreground" /> <foreground android:drawable="@drawable/ic" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" /> <monochrome android:drawable="@drawable/ic" />
</adaptive-icon> </adaptive-icon>

@ -4,22 +4,31 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mobile_navigation" android:id="@+id/mobile_navigation"
app:startDestination="@+id/navigation_home"> app:startDestination="@+id/navigation_home">
<fragment
android:id="@+id/navigation_home2"
android:name="com.example.myapplication.ui.home.GarbageRecognitionActivity"
android:label="@string/title_home"
tools:layout="@layout/fragment_home" />
<fragment <fragment
android:id="@+id/navigation_home" android:id="@+id/navigation_home"
android:name="com.example.myapplication.ui.home.HomeFragment" android:name="com.example.myapplication.ui.home.GarbageRecognitionActivity"
android:label="@string/title_home" android:label="@string/title_home"
tools:layout="@layout/fragment_home" /> tools:layout="@layout/fragment_home" />
<fragment <fragment
android:id="@+id/navigation_dashboard" android:id="@+id/navigation_dashboard"
android:name="com.example.myapplication.ui.dashboard.DashboardFragment" android:name="com.example.myapplication.ui.dashboard.MapActivity"
android:label="@string/title_dashboard" android:label="@string/title_dashboard"
tools:layout="@layout/fragment_dashboard" /> tools:layout="@layout/fragment_dashboard" />
<fragment <fragment
android:id="@+id/navigation_notifications" android:id="@+id/navigation_notifications"
android:name="com.example.myapplication.ui.notifications.NotificationsFragment" android:name="com.example.myapplication.ui.notifications.UserFeedbackActivity"
android:label="@string/title_notifications" android:label="@string/title_notifications"
tools:layout="@layout/fragment_notifications" /> tools:layout="@layout/fragment_notifications" />
<fragment
android:id="@+id/navigation_quiz"
android:name="com.example.myapplication.ui.quiz.GarbageQuizActivity"
android:label="quiz"
tools:layout="@layout/garbage_quiz"/>
</navigation> </navigation>

@ -2,10 +2,15 @@
<resources> <resources>
<color name="purple_200">#FFBB86FC</color> <color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color> <color name="purple_500">#FF6200EE</color>
<color name="blue">#078EFA</color>
<color name="purple_700">#FF3700B3</color> <color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color> <color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color> <color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="grey">#CABFBF</color> <color name="grey">#CABFBF</color>
<color name="tinggreen">#E0F7B1</color>
<color name="green21">#555C5A</color>
<color name="grey1">#F6F6F6</color>
<color name="grey2">#5F6B7B</color>
</resources> </resources>

@ -1,5 +1,5 @@
<resources> <resources>
<string name="app_name">My Application</string> <string name="app_name">垃圾小助手</string>
<string name="title_activity_bottom_navigiation">BottomNavigiationActivity</string> <string name="title_activity_bottom_navigiation">BottomNavigiationActivity</string>
<string name="title_home">Home</string> <string name="title_home">Home</string>
<string name="title_dashboard">Dashboard</string> <string name="title_dashboard">Dashboard</string>

@ -2,11 +2,11 @@
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.MyApplication" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <style name="Theme.MyApplication" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">#0435FA</item> <item name="colorPrimary">#287EFF</item>
<item name="colorPrimaryVariant">#0541F4</item> <item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/white</item> <item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. --> <!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item> <item name="colorSecondary">@color/blue</item>
<item name="colorSecondaryVariant">@color/teal_700</item> <item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">#0435FA</item> <item name="colorOnSecondary">#0435FA</item>
<!-- Status bar color. --> <!-- Status bar color. -->

@ -4,14 +4,14 @@ import org.junit.Test;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import com.example.myapplication.ui.home.GarbageRecognition;
import com.example.myapplication.ui.home.GarbageRecognitionActivity;
/** /**
* Example local unit test, which will execute on the development machine (host). * Example local unit test, which will execute on the development machine (host).
* *
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/ */
public class ExampleUnitTest { public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} }
Loading…
Cancel
Save