提交 a2751730 编写于 作者: 勇敢di牛牛's avatar 勇敢di牛牛

first push

上级 508fe347
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# Default ignored files
/shelf/
/workspace.xml
testApp
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="881QADSH57S24" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2022-04-28T11:25:08.896255300Z" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.127" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/bottom_btn_selected_color.xml" value="0.1215" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/bottom_nav_background.xml" value="0.1435" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/bottom_nav_selector.xml" value="0.1215" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/btn_blue.xml" value="0.12" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/btn_green.xml" value="0.11200000000000002" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/btn_white.xml" value="0.10666666666666667" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/edit_text.xml" value="0.1" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_collect.xml" value="0.1" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_collected.xml" value="0.1" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_dashboard_black_24dp.xml" value="0.132" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_home_black_24dp.xml" value="0.1085" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_launcher_background.xml" value="0.127" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_launcher_foreground.xml" value="0.1435" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_mysel_pressed.xml" value="0.132" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_myself.xml" value="0.1" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_net_error.xml" value="0.1185" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_news.xml" value="0.138" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_news_.xml" value="0.1185" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_notifications_black_24dp.xml" value="0.1085" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/ic_tools.xml" value="0.138" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/nav_selector_myself.xml" value="0.1" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/tool_title.xml" value="0.138" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/drawable/tools_card_background.xml" value="0.138" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout-v28/bun_view.xml" value="0.1" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/activity_main.xml" value="0.2" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/activity_navigation.xml" value="0.12601626016260162" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/bun_view.xml" value="0.4" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/fragment_dashboard.xml" value="0.12083333333333333" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/fragment_home.xml" value="0.12083333333333333" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/fragment_myself.xml" value="0.1" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/fragment_news.xml" value="0.16354166666666667" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/fragment_notifications.xml" value="0.12083333333333333" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/fragment_tools.xml" value="0.13257575757575757" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/my_card_view.xml" value="0.22" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/mycardview.xml" value="0.11822916666666666" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/mylistview.xml" value="0.17864583333333334" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/mylistvuew.xml" value="0.11822916666666666" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/layout/test.xml" value="0.1" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/menu/bottom_menu.xml" value="0.12083333333333333" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/menu/bottom_nav_menu.xml" value="0.12083333333333333" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.127" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.1" />
<entry key="..\:/Android Toos/Android project/app/src/main/res/xml/network_security_config.xml" value="0.13072916666666667" />
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
<component name="VisualizationToolProject">
<option name="state">
<ProjectState>
<option name="scale" value="0.2" />
</ProjectState>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RenderSettings">
<option name="showDecorations" value="true" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/englishlearningapp" vcs="Git" />
</component>
</project>
\ No newline at end of file
/build
\ No newline at end of file
plugins {
id 'com.android.application'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.testapp"
minSdk 23
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'com.github.bumptech.glide:glide:4.13.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.1'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
package com.example.testapp;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.testapp", appContext.getPackageName());
}
}
\ No newline at end of file
package util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
public class tools {
public static boolean isNetworkConnected(Context context) {
if (context != null) {
ConnectivityManager mConnectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo mNetworkInfo = mConnectivityManager.getActiveNetworkInfo();
if (mNetworkInfo != null) {
return mNetworkInfo.isAvailable();
}
}
return false;
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.testapp">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:networkSecurityConfig="@xml/network_security_config"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.TestApp"
android:usesCleartextTraffic="true">
<activity
android:name=".NavigationActivity"
android:exported="false"
android:label="@string/title_activity_navigation" />
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
package com.example.testapp;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.example.testapp.Util.States;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
public class MainActivity extends Activity {
String TAG = "MainActivity";
Button btn_login;
Button btn_register;
EditText edt_user;
EditText edt_password;
//private Handler handler;
private String res;
private static final int SUCCESS = 0;
private static final int FAILURE = 1; //
private String password= "";
private String username ="";
String stringUrl = "http://nnggb.com/test/test.php";
Context context;
private Handler mHander = new Handler(Looper.getMainLooper()) {
@SuppressLint("SetTextI18n")
public void handleMessage(Message msg) {
switch(msg.what){
case SUCCESS:
ShowLoginToast(); //提示账号密码是否正确以及服务器是否出现问题
break;
case FAILURE:
Toast toast = Toast.makeText(MainActivity.this,"请求失败,请检查网络",Toast.LENGTH_SHORT);
toast.show();
break;
}
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btn_login = findViewById(R.id.bt_login);
btn_register = findViewById(R.id.bt_register);
edt_user = findViewById(R.id.edt_user);
edt_password =findViewById(R.id.edt_password);
btn_login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
username = String.valueOf(edt_user.getText()); //获取文本框内容
password = String.valueOf(edt_password.getText());
Intent intent = new Intent(MainActivity.this, NavigationActivity.class);
startActivity(intent);
Log.i(TAG, States.getNetName(MainActivity.this)); //打印网络状态
Toast toast = Toast.makeText(MainActivity.this, States.getNetName(MainActivity.this),Toast.LENGTH_SHORT);
toast.show();
//GetURLResByPost();`
//ShowLoginToast(); //千万不能写在这里,这里网络请求还没回来,res是空的
}
});
}
public void GetURLResByPost(){
new Thread(new Runnable(){
public void run(){
try {
JSONObject json = new JSONObject();
json.put("username",username);
json.put("password",password);
Log.i("勇敢id牛牛", String.valueOf(json));
URL myurl = new URL(stringUrl);
HttpURLConnection urlCon = (HttpURLConnection)myurl.openConnection();
urlCon.setConnectTimeout(3000);
urlCon.setDoInput(true); //设置允许输入
urlCon.setDoOutput(true);//设置输出允许
urlCon.setRequestMethod("POST");
OutputStreamWriter out = new OutputStreamWriter(urlCon.getOutputStream());
//DataOutputStream out = new DataOutputStream(urlCon.getOutputStream());
out.write(json.toString());
out.flush();
out.close();
if(urlCon.getResponseCode() == 200){
InputStreamReader in = new InputStreamReader(urlCon.getInputStream());
BufferedReader buffer = new BufferedReader(in);
// String inputLine = null;
// StringBuffer pageBuffer = new StringBuffer();
// while((inputLine = buffer.readLine()) != null){
// pageBuffer.append(inputLine +"\n");
// } //上面的写法是接受的数据有多行,我这里只有一个数字。用着个方法会多一个空格。
//res = String.valueOf(buffer.read()); //这种写法是错误的
res = buffer.readLine(); //只读取第一行
mHander.sendEmptyMessage(0);
in.close();
buffer.close();
urlCon.disconnect();
}else{
mHander.sendEmptyMessage(1);
}
} catch (MalformedURLException e) {
e.printStackTrace();
mHander.sendEmptyMessage(1);
} catch (IOException e) {
mHander.sendEmptyMessage(1);
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
}
}).start();
}
public void ShowLoginToast(){
String tip = "";
if (res.equals("0")){ //查询的密码不正确
tip = "账号或密码不正确";
}else if(res.equals("1")){
tip = "登录成功 ";
}else if(res.equals("404")){
tip = "服务器端配置错误";
}
if (!tip.equals("")){
Toast toast = Toast.makeText(MainActivity.this, tip,Toast.LENGTH_SHORT);
toast.show();
}
}
}
\ No newline at end of file
package com.example.testapp;
import android.app.Fragment;
import android.nfc.Tag;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import com.google.android.material.bottomnavigation.BottomNavigationItemView;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import com.example.testapp.databinding.ActivityNavigationBinding;
public class NavigationActivity extends AppCompatActivity {
private ActivityNavigationBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
ActionBar actionbar = getSupportActionBar();
assert actionbar != null;
actionbar.hide();
super.onCreate(savedInstanceState);
binding = ActivityNavigationBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
BottomNavigationView navView = findViewById(R.id.nav_view);
// BottomNavigationItemView notificationsview = findViewById(R.id.navigation_notifications);
// notificationsview.setIcon(R.drawable.ic_mysel_pressed);
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
R.id.navigation_home, R.id.navigation_news, R.id.navigation_myself, R.id.navigation_myself)
.build();
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_activity_navigation);
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
NavigationUI.setupWithNavController(binding.navView, navController);
}
}
\ No newline at end of file
package com.example.testapp.Util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.NetworkInfo.State;
import android.util.Log;
public class States {
private static int Net_State_Wifi = 2;
private static int Net_State_Mobile = 1;
private static int Net_No = 0;
private static int Net_others = 3;
private static int Get_Net_State_Fail = -1;
private static int Net_State = Get_Net_State_Fail;
private static String TAG = "States";
public static void isNetworkConnected(Context context) {
ConnectivityManager mConnectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo mNetworkInfo = mConnectivityManager.getActiveNetworkInfo();
Log.i(TAG, String.format("isNetworkConnected: %s",mNetworkInfo));
if (null == mNetworkInfo){
Net_State = Get_Net_State_Fail;
return;
}
if (mNetworkInfo.getType() == ConnectivityManager.TYPE_MOBILE){
Log.i(TAG, String.format("isNetworkConnected: %s",mNetworkInfo.getType()));
Net_State = Net_State_Mobile;
return;
}
if (mNetworkInfo.getType() == ConnectivityManager.TYPE_WIFI){
Log.i(TAG, String.format("isNetworkConnected: %s",mNetworkInfo.isConnected()));
Net_State = Net_State_Wifi;
return;
}
if (!mNetworkInfo.isConnected()){
Log.i(TAG, String.format("isNetworkConnected: %s",mNetworkInfo.isConnected()));
Net_State = Net_No;
}else{
Log.i(TAG, String.format("isNetworkConnected: %s",mNetworkInfo.isConnected()));
Net_State = Net_others;
}
}
public static String getNetName(Context context){
isNetworkConnected(context);
if (Net_State == Net_No){
return "Net_No";
}else if(Net_State == Net_State_Mobile){
return "Net_State_Mobile";
}else if(Net_State == Net_State_Wifi){
return "Net_State_Wifi";
}else if(Net_State == Get_Net_State_Fail){
return "Get_Net_State_Fail";
}else{
return "Net_others";
}
}
}
package com.example.testapp.Util;
import static com.example.testapp.R.drawable.ic_collected;
import android.annotation.SuppressLint;
import android.content.Context;
import java.net.MalformedURLException;
import java.net.URL;
import android.net.Uri;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.fragment.app.Fragment;
import com.bumptech.glide.Glide;
import com.example.testapp.R;
import com.example.testapp.ui.tools.ToolsFragment;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
public class ToolsCardListAdapter extends BaseAdapter {
String TAG = "ToolsCardListAdapter";
LayoutInflater inflater; //作用相当于FindViewById,反射器
List<Map<String, Object>> list;
public ToolsCardListAdapter(LayoutInflater flater) {
inflater = flater;
}
public void setList(List<Map<String, Object>> list1){
Log.i(TAG, String.format("setList: %s",list1));
list = list1;
}
@Override
public int getCount() {
return list.toArray().length;
}
@Override
public Object getItem(int position) {
return list.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup viewGroup) {
if (convertView == null) {
View view = inflater.inflate(R.layout.my_card_view, null);
ImageView imageView = view.findViewById(R.id.card_image);
ImageButton imgButton = view.findViewById(R.id.card_collect);
Log.i(TAG, String.format("getView:创建视图,位置: %s", position));
imgButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
imgButton.setImageResource(ic_collected);
Log.i(TAG, "onClick: 你点击了收藏按钮!");
Toast toast = Toast.makeText(inflater.getContext(), String.format("你点击的是第 %d 个收藏按钮", position), Toast.LENGTH_SHORT);
toast.show();
}
});
//Uri uri = Uri.parse((String) list.get(position).get("url"));
Glide.with(imageView).load(list.get(position).get("url")).into(imageView);
//imageView.setImageURI(uri);
TextView title = view.findViewById(R.id.card_title);
TextView text = view.findViewById(R.id.card_text);
title.setText(list.get(position).get("title").toString());
text.setText(list.get(position).get("text").toString());
return view;
}else{
return convertView;
}
}
}
package com.example.testapp.ui.home;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import com.example.testapp.databinding.FragmentHomeBinding;
public class HomeFragment extends Fragment {
private FragmentHomeBinding binding;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
HomeViewModel homeViewModel =
new ViewModelProvider(this).get(HomeViewModel.class);
binding = FragmentHomeBinding.inflate(inflater, container, false);
View root = binding.getRoot();
final TextView textView = binding.textHome;
homeViewModel.getText().observe(getViewLifecycleOwner(), textView::setText);
return root;
}
@Override
public void onDestroyView() {
super.onDestroyView();
binding = null;
}
}
\ No newline at end of file
package com.example.testapp.ui.home;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class HomeViewModel extends ViewModel {
private final MutableLiveData<String> mText;
public HomeViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is home fragment");
}
public LiveData<String> getText() {
return mText;
}
}
\ No newline at end of file
package com.example.testapp.ui.myself;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import com.example.testapp.databinding.FragmentMyselfBinding;
public class MyselfFragment extends Fragment {
private FragmentMyselfBinding binding;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
MyselfViewModel notificationsViewModel =
new ViewModelProvider(this).get(MyselfViewModel.class);
binding = FragmentMyselfBinding.inflate(inflater, container, false);
View root = binding.getRoot();
final TextView textView = binding.textMyself;
notificationsViewModel.getText().observe(getViewLifecycleOwner(), textView::setText);
return root;
}
@Override
public void onDestroyView() {
super.onDestroyView();
binding = null;
}
}
\ No newline at end of file
package com.example.testapp.ui.myself;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class MyselfViewModel extends ViewModel {
private final MutableLiveData<String> mText;
public MyselfViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is notifications myself");
}
public LiveData<String> getText() {
return mText;
}
}
\ No newline at end of file
package com.example.testapp.ui.news;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import com.example.testapp.databinding.FragmentNewsBinding;
public class NewsFragment extends Fragment {
private FragmentNewsBinding binding;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
NewsViewModel newsViewModel =
new ViewModelProvider(this).get(NewsViewModel.class);
binding = FragmentNewsBinding.inflate(inflater, container, false);
View root = binding.getRoot();
final TextView textView = binding.textDashboard;
newsViewModel.getText().observe(getViewLifecycleOwner(), textView::setText);
return root;
}
@Override
public void onDestroyView() {
super.onDestroyView();
binding = null;
}
}
\ No newline at end of file
package com.example.testapp.ui.news;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class NewsViewModel extends ViewModel {
private final MutableLiveData<String> mText;
public NewsViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is dashboard fragment");
}
public LiveData<String> getText() {
return mText;
}
}
\ No newline at end of file
package com.example.testapp.ui.tools;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import com.example.testapp.Util.ToolsCardListAdapter;
import com.example.testapp.databinding.FragmentToolsBinding;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ToolsFragment extends Fragment {
private String TAG = "ToolsFragment";
private ListView listView;
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
private FragmentToolsBinding binding;
@SuppressLint("ResourceType")
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
binding = FragmentToolsBinding.inflate(inflater, container, false);
View root = binding.getRoot();
String[] urls = new String[]{"https://fanyi-cdn.cdn.bcebos.com/static/translation/img/header/logo_e835568.png",
"https://ssyerv1.oss-cn-hangzhou.aliyuncs.com/picture/55540c3d94454de0a7492fbf13569a96.png",
"https://img-home.csdnimg.cn/images/20201124032511.png",
"https://img-home.csdnimg.cn/images/20201124032511.png"};
String[] titles = new String[]{"查单词","查音标","去CSDN","去CSDN"};
String[] texts = new String[]{"源自百度翻译Api","算了,随便写算了","去CSDN,给勇敢di牛牛点赞","去CSDN,看勇敢di牛牛有没有发布新文章"};
//装填数据
for (int i =0;i < urls.length;i++){
Map<String,Object> map = new HashMap<String,Object>();
map.put("url",urls[i]);
map.put("title",titles[i]);
map.put("text",texts[i]);
list.add(map);
}
ToolsCardListAdapter adapter = new ToolsCardListAdapter(inflater);
listView = binding.toollist;
adapter.setList(list);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
Log.i(TAG, String.format("onItemClick: listviewItem 点击事件生效:第 %s 个!",position));
Toast toast = Toast.makeText(getContext(),String.format("你点击的是第 %d 个Item",position),Toast.LENGTH_SHORT);
toast.show();
}
}
);
return root;
}
@Override
public void onDestroyView() {
super.onDestroyView();
binding = null;
}
}
\ No newline at end of file
package com.example.testapp.ui.tools;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class ToolsViewModel extends ViewModel {
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_checked="true"
android:color="@color/nav_ic_checked"/>
<item
android:state_checked="false"
android:color="@color/nav_ic_checked_no"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/btn_blue" />
<corners android:radius="@dimen/btn_blue_radius"/>
</shape>
</item>
<item
android:bottom="2px"
android:left="2px"
android:right="2px"
android:top="2px">
<shape
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<corners android:radius="@dimen/btn_blue_radius" />
<stroke
android:width="2px"
android:color="@color/btn_blue" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/btn_green_radius"/>
<solid android:color="@color/btn_green"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/white" />
<corners android:radius="@dimen/btn_blue_radius"/>
</shape>
</item>
<item
android:bottom="1px"
android:left="1px"
android:right="1px"
android:top="1px">
<shape
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<corners android:radius="@dimen/btn_blue_radius" />
<stroke
android:width="2px"
android:color="@color/btn_blue" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="0dp"
android:bottom="0dp">
<shape android:shape="rectangle">
<solid
android:color="@color/transparent_1" />
<corners
android:radius="45dp" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:left="2dp"
android:top="2dp">
<shape android:shape="rectangle" >
<gradient
android:angle="270"
android:endColor="#0F000000"
android:startColor="#0F000000" />
<corners
android:bottomLeftRadius="6dip"
android:bottomRightRadius="6dip"
android:topLeftRadius="6dip"
android:topRightRadius="6dip" />
</shape>
</item>
<item
android:bottom="3dp"
android:right="3dp">
<shape android:shape="rectangle" >
<gradient
android:angle="270"
android:endColor="#FFFFFF"
android:startColor="#FFFFFF" />
<corners
android:bottomLeftRadius="6dip"
android:bottomRightRadius="6dip"
android:topLeftRadius="6dip"
android:topRightRadius="6dip" />
</shape>
</item>
</layer-list>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp"
android:height="128dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M682.67,711.11h-341.33a28.44,28.44 0,0 1,0 -56.89h341.33a28.44,28.44 0,0 1,0 56.89zM745.24,847.64H278.76a28.44,28.44 0,0 1,0 -56.89h466.49a28.44,28.44 0,0 1,0 56.89z"
android:fillColor="#1368E5"/>
<path
android:pathData="M824.89,56.89a51.2,51.2 0,0 1,56.89 56.89v796.44a51.2,51.2 0,0 1,-56.89 56.89H199.11a51.2,51.2 0,0 1,-56.89 -56.89V113.78a51.2,51.2 0,0 1,56.89 -56.89h625.78m0,-56.89H199.11a113.78,113.78 0,0 0,-113.78 113.78v796.44a113.78,113.78 0,0 0,113.78 113.78h625.78a113.78,113.78 0,0 0,113.78 -113.78V113.78a113.78,113.78 0,0 0,-113.78 -113.78z"
android:fillColor="#1368E5"/>
<path
android:pathData="M512,568.89h-17.07l-28.44,-22.76C369.78,449.42 307.2,392.53 307.2,312.89a130.84,130.84 0,0 1,34.13 -91.02,130.84 130.84,0 0,1 91.02,-34.13 130.84,130.84 0,0 1,79.64 22.76,130.84 130.84,0 0,1 79.64,-22.76 130.84,130.84 0,0 1,91.02 34.13,130.84 130.84,0 0,1 34.13,91.02c0,79.64 -62.58,136.53 -159.29,227.56l-28.44,22.76zM432.36,244.62a79.64,79.64 0,0 0,-51.2 17.07,79.64 79.64,0 0,0 -17.07,51.2c0,51.2 56.89,102.4 142.22,182.04h11.38c85.33,-79.64 142.22,-130.84 142.22,-182.04a79.64,79.64 0,0 0,-17.07 -51.2,79.64 79.64,0 0,0 -51.2,-17.07 68.27,68.27 0,0 0,-56.89 22.76,28.44 28.44,0 0,1 -45.51,0 68.27,68.27 0,0 0,-56.89 -22.76z"
android:fillColor="#1368E5"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp"
android:height="128dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M682.67,711.11h-341.33a28.44,28.44 0,0 1,0 -56.89h341.33a28.44,28.44 0,0 1,0 56.89zM745.24,847.64H278.76a28.44,28.44 0,0 1,0 -56.89h466.49a28.44,28.44 0,0 1,0 56.89z"
android:fillColor="#1368E5"/>
<path
android:pathData="M824.89,56.89a51.2,51.2 0,0 1,56.89 56.89v796.44a51.2,51.2 0,0 1,-56.89 56.89H199.11a51.2,51.2 0,0 1,-56.89 -56.89V113.78a51.2,51.2 0,0 1,56.89 -56.89h625.78m0,-56.89H199.11a113.78,113.78 0,0 0,-113.78 113.78v796.44a113.78,113.78 0,0 0,113.78 113.78h625.78a113.78,113.78 0,0 0,113.78 -113.78V113.78a113.78,113.78 0,0 0,-113.78 -113.78z"
android:fillColor="#1368E5"/>
<path
android:pathData="M512,568.89h-17.07l-28.44,-22.76C369.78,449.42 307.2,392.53 307.2,312.89a130.84,130.84 0,0 1,34.13 -91.02,130.84 130.84,0 0,1 91.02,-34.13 130.84,130.84 0,0 1,79.64 22.76,130.84 130.84,0 0,1 79.64,-22.76 130.84,130.84 0,0 1,91.02 34.13,130.84 130.84,0 0,1 34.13,91.02c0,79.64 -62.58,136.53 -159.29,227.56l-28.44,22.76zM432.36,244.62a79.64,79.64 0,0 0,-51.2 17.07,79.64 79.64,0 0,0 -17.07,51.2c0,51.2 56.89,102.4 142.22,182.04h11.38c85.33,-79.64 142.22,-130.84 142.22,-182.04a79.64,79.64 0,0 0,-17.07 -51.2,79.64 79.64,0 0,0 -51.2,-17.07 68.27,68.27 0,0 0,-56.89 22.76,28.44 28.44,0 0,1 -45.51,0 68.27,68.27 0,0 0,-56.89 -22.76z"
android:fillColor="#E6F44336"/>
</vector>
<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>
<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>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp"
android:height="128dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M512,556.03c-121.86,0 -220.16,-98.3 -220.16,-220.16S390.14,115.71 512,115.71s220.16,98.3 220.16,220.16S633.86,556.03 512,556.03zM512,197.63c-75.78,0 -138.24,62.46 -138.24,138.24S436.22,474.11 512,474.11s138.24,-62.46 138.24,-138.24S587.78,197.63 512,197.63z"
android:fillColor="#63F7DE"/>
<path
android:pathData="M829.44,564.22H686.08v81.92h91.14l-51.2,181.25H297.98l-51.2,-181.25H337.92v-81.92H194.56L154.62,614.4l71.68,263.17 39.94,31.74h491.52l39.94,-31.74 71.68,-263.17z"
android:fillColor="#437DFF"/>
</vector>
此差异已折叠。
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp"
android:height="128dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M829.9,205.9v-43.2c0,-26 -10.3,-51 -28.8,-69.4 -18.4,-18.4 -43.4,-28.7 -69.4,-28.7L174.6,64.6c-54.2,0 -98.2,43.9 -98.2,98.1v698.5c0,26 10.3,51 28.8,69.4 18.4,18.4 43.4,28.7 69.4,28.7L873,959.3c26,0 36.4,-9.6 51.1,-23.6 18.9,-17.9 23.5,-48.5 23.5,-74.6L947.6,319.7c0,-73.1 -85.6,-113.8 -117.7,-113.8zM877,841.6c0,21.7 -25.4,47.1 -47.1,47.1L618,888.7l-431,0.3c-22.2,0 -40.2,-17.9 -40.2,-40L146.8,175c0,-22.1 17.9,-40 40.2,-40h532.3c10.7,0 20.9,4.2 28.4,11.7 7.5,7.5 11.8,17.7 11.8,28.3l-0.3,548.9c0,21.7 9.7,47.3 31.4,47.3s39.2,-13.9 39.2,-35.5L829.8,300.1c10.4,0 47.1,18.3 47.1,47.1v494.4zM653.3,253L253,253c-19.5,0 -35.3,15.8 -35.3,35.3 0,19.5 15.8,35.3 35.3,35.3h400.3c19.5,0 35.3,-15.8 35.3,-35.3 0,-19.5 -15.8,-35.3 -35.3,-35.3zM653.3,441.4L253,441.4c-19.5,0 -35.3,15.8 -35.3,35.3 0,19.5 15.8,35.3 35.3,35.3h400.3c19.5,0 35.3,-15.8 35.3,-35.3 0,-19.5 -15.8,-35.3 -35.3,-35.3zM417.8,629.7L253,629.7c-19.5,0 -35.3,15.8 -35.3,35.3s15.8,35.3 35.3,35.3h164.8c19.5,0 35.3,-15.8 35.3,-35.3s-15.8,-35.3 -35.3,-35.3z"
android:fillColor="#1296db"/>
</vector>
<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>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp"
android:height="128dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M500.3,532c-43.3,0 -78.6,-35.2 -78.6,-78.6H370c0,3.6 0.1,7.2 0.4,10.7 5.5,66.9 61.6,119.7 129.9,119.7 66.6,0 121.7,-50.2 129.4,-114.7 0.6,-5.1 0.9,-10.4 0.9,-15.7h-51.8c0.1,43.3 -35.2,78.6 -78.5,78.6z"
android:fillColor="#A1AFFF"/>
<path
android:pathData="M847.1,869.3L153.5,869.3c-27.8,0 -50.4,-22.6 -50.4,-50.4L103.1,298c0,-27.8 22.6,-50.4 50.4,-50.4h693.7c27.8,0 50.4,22.6 50.4,50.4v520.9c0,27.8 -22.6,50.4 -50.5,50.4zM163.6,808.8h673.5L837.1,308.1L163.6,308.1v500.7z"
android:fillColor="#4A5FE2"/>
<path
android:pathData="M144.7,430.7H856v60.5H144.7zM341.6,294.5h-60.5v-102c0,-27.2 22.1,-49.3 49.3,-49.3h339.8c27.2,0 49.3,22.1 49.3,49.3v95.3H659v-84.1H341.6v90.8z"
android:fillColor="#4A5FE2"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="327dp"
android:height="127dp"
android:viewportWidth="327"
android:viewportHeight="127">
<path
android:pathData="M14,0L313,0A14,14 0,0 1,327 14L327,113A14,14 0,0 1,313 127L14,127A14,14 0,0 1,0 113L0,14A14,14 0,0 1,14 0z"
android:fillColor="#F6F6F6"/>
<group>
<clip-path
android:pathData="M34,20L96,20A14,14 0,0 1,110 34L110,93A14,14 0,0 1,96 107L34,107A14,14 0,0 1,20 93L20,34A14,14 0,0 1,34 20z"/>
<path
android:pathData="M8.625,16.5h136v182h-136z"/>
</group>
<path
android:pathData="M269.666,38.576C269.34,38.754 268.932,38.635 268.749,38.31C268.696,38.207 268.667,38.093 268.667,37.978L268.667,33.139C268.667,33.619 268.937,33.915 269.649,34.247L273.994,36.414L269.666,38.576Z"
android:strokeAlpha="0.4"
android:fillColor="#1979FF"
android:fillAlpha="0.4"/>
<path
android:pathData="M268.667,33.139L268.667,27.862C268.667,26.044 270.131,25.333 271.93,25.333L276.046,25.333C277.851,25.333 279.315,26.044 279.333,27.862L279.333,37.978C279.333,38.092 279.304,38.203 279.251,38.304C279.165,38.467 279.017,38.589 278.841,38.64C278.665,38.691 278.475,38.668 278.316,38.576L273.994,36.414L269.648,34.247C268.937,33.915 268.667,33.619 268.667,33.139ZM271.483,29.361C271.194,29.361 270.96,29.597 270.96,29.888C270.96,30.179 271.194,30.415 271.483,30.415L276.499,30.415C276.788,30.415 277.022,30.179 277.022,29.888C277.022,29.597 276.788,29.361 276.499,29.361L271.483,29.361Z"
android:fillColor="#1979FF"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_window_focused="false"
android:color="@color/tools_card_background"/>
<item
android:state_window_focused="true"
android:color="@color/tools_card_background"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<EditText
android:id="@+id/edt_user"
android:textColor="@color/black"
android:background="@drawable/edit_text"
android:textColorHint="@color/edit_hint"
android:layout_width="@dimen/btn_edit_width"
android:layout_height="@dimen/btn_edit_height"
android:layout_centerHorizontal="true"
android:layout_marginTop="250dp"
android:hint="@string/login_login_user"
android:inputType="text"
android:shadowColor="@color/edit_shadow" />
<EditText
android:id="@+id/edt_password"
android:textColor="@color/black"
android:layout_width="@dimen/btn_edit_width"
android:layout_height="@dimen/btn_edit_height"
android:textColorHint="@color/edit_hint"
android:layout_below="@+id/edt_user"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:background="@drawable/edit_text"
android:hint="@string/login_cancel_password"
android:inputType="textPassword"
android:shadowColor="@color/edit_shadow" />
<Button
android:id="@+id/bt_login"
android:background="@drawable/btn_blue"
android:text="@string/login_login_text"
android:layout_centerHorizontal="true"
android:textSize="@dimen/btn_login_text_size"
android:layout_marginTop="400dp"
android:layout_width="@dimen/btn_login_width"
android:layout_height="@dimen/btn_login_height"/>
<Button
android:id="@+id/bt_register"
android:layout_below="@+id/bt_login"
android:layout_marginTop="40dp"
android:textColor="@color/btn_blue"
android:layout_centerHorizontal="true"
android:background="@drawable/btn_white"
android:text="@string/login_cancel_text"
android:textSize="@dimen/btn_login_text_size"
android:layout_width="@dimen/btn_login_width"
android:layout_height="@dimen/btn_login_height"/>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="?attr/actionBarSize">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/nav_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="24dp"
android:background="?android:attr/windowBackground"
android:elevation="0dp"
android:outlineProvider="none"
app:itemBackground="@color/transparent"
app:itemIconSize="30dp"
app:itemIconTint="@drawable/bottom_btn_selected_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:menu="@menu/bottom_nav_menu" />
<fragment
android:id="@+id/nav_host_fragment_activity_navigation"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="80dp"
app:defaultNavHost="false"
app:navGraph="@navigation/mobile_navigation" />
</RelativeLayout>
\ No newline at end of file
<?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.HomeFragment">
<TextView
android:id="@+id/text_home"
android:text="这里是home"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
android:background="@drawable/ic_net_error" >
<TextView
android:id="@+id/text_myself"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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.news.NewsFragment">
<ImageView
android:layout_width="wrap_content"
android:layout_height="400dp"
android:layout_marginTop="150dp"
android:layout_centerHorizontal="true"
android:contentDescription="@string/net_error"
android:scaleType="fitCenter"
android:src="@drawable/ic_net_error" />
<TextView
android:id="@+id/text_dashboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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:background="#2F00BCD4"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.tools.ToolsFragment">
<ListView
android:divider="#00000000"
android:dividerHeight="18dp"
android:id="@+id/toollist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp">
</ListView>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
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:background="@color/transparent_1"
app:cardCornerRadius="14dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:descendantFocusability="blocksDescendants"
android:layout_width="match_parent"
android:layout_height="130dp">
<ImageView
android:id="@+id/card_image"
android:layout_width="120dp"
android:layout_height="140dp"
android:layout_margin="5dp"
android:scaleType="fitCenter"
android:src="@drawable/translate" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/card_collect"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:background="@color/transparent"
android:contentDescription="@string/collect"
android:scaleType="centerCrop"
android:src="@drawable/ic_collect" />
</RelativeLayout>
<TextView
android:id="@+id/card_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/card_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ListView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ListView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/navigation_home"
android:icon="@drawable/ic_home_black_24dp"
android:title="@string/title_home" />
<item
android:id="@+id/navigation_news"
android:icon="@drawable/ic_news"
android:title="@string/title_dashboard"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/navigation_tools"
android:icon="@drawable/ic_tools"
android:title="@string/tools" />
<!-- 这里添加一个个人中心-->
<item
android:id="@+id/navigation_myself"
android:icon="@drawable/ic_myself"
android:title="@string/nav_myself" />
</menu>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<navigation
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:id="@+id/mobile_navigation"
app:startDestination="@+id/navigation_home">
<fragment
android:id="@+id/navigation_home"
android:name="com.example.testapp.ui.home.HomeFragment"
android:label="@string/title_home"
android:layout="@layout/fragment_home" />
<fragment
android:id="@+id/navigation_news"
android:name="com.example.testapp.ui.news.NewsFragment"
android:label="news"
android:layout="@layout/fragment_news" />
<fragment
android:id="@+id/navigation_tools"
android:name="com.example.testapp.ui.tools.ToolsFragment"
android:label="@string/title_notifications"
android:layout="@layout/fragment_tools" />
<fragment
android:id="@+id/navigation_myself"
android:name="com.example.testapp.ui.myself.MyselfFragment"
android:label="@string/title_notifications"
android:layout="@layout/fragment_myself" />
</navigation>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.TestApp" parent="Theme.AppCompat.DayNight.DarkActionBar">
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="cardview_list">
<item>
</item>
</array>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="btn_green">#3FA162</color>
<color name="btn_blue">#0079FF</color>
<color name="red">#F44336</color>
<color name="edit_hint">#80343965</color>
<color name="edit_shadow">#001DB0</color>
<color name="transparent">#00F2E9E9</color>
<color name="nav_ic_checked">#EAE71E</color>
<color name="nav_ic_checked_no">#1296db</color>
<color name="tools_card_background">#F6F6F6</color>
<color name="transparent_1">#0FF6F6F6</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="btn_login_width">250dp</dimen>
<dimen name="btn_login_height">50dp</dimen>
<dimen name="btn_edit_width">317dp</dimen>
<dimen name="btn_edit_height">52dp</dimen>
<dimen name="btn_green_radius">12dp</dimen>
<dimen name="btn_blue_radius">24dp</dimen>
<dimen name="btn_login_text_size">24sp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">testApp</string>
<string name="login_login_text">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="login_cancel_text">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="login_login_user">账号</string>
<string name="login_cancel_password">密码</string>
<string name="title_activity_navigation">NavigationActivity</string>
<string name="title_home">Home</string>
<string name="title_dashboard">Dashboard</string>
<string name="title_notifications">Notifications</string>
<string name="net_error">加载错误</string>
<string name="nav_myself">个人中心</string>
<string name="tools">工具箱</string>
<string name="collect">收藏</string>
<string name="from_api">汉译英,英译汉。 From 百度翻译Api。</string>
<string name="Find_word">单词/句子查询</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="btn_login">
<item name="background">@drawable/btn_blue</item>
<item name="android:textSize">24sp</item>
</style>
</resources>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.TestApp" parent="Theme.AppCompat.DayNight.DarkActionBar">
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">developer.alexanderklimov.ru/</domain>
</domain-config>
</network-security-config>
\ No newline at end of file
package com.example.testapp;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.1.3' apply false
id 'com.android.library' version '7.1.3' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
\ No newline at end of file
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
\ No newline at end of file
#Sun Apr 10 23:47:43 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "testApp"
include ':app'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册