!1 初始化界面

Merge pull request !1 from Amdi/master
This commit is contained in:
肖岩 2021-05-26 18:04:43 +08:00 committed by Gitee
commit 9bbe6ead62
57 changed files with 315 additions and 187 deletions

2
.idea/misc.xml generated
View File

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

View File

@ -20,19 +20,14 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// compileOptions {
// sourceCompatibility JavaVersion.VERSION_1_8
// targetCompatibility JavaVersion.VERSION_1_8
// }
}
dependencies {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
@ -42,14 +37,9 @@ android {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//butterknife依赖
implementation 'com.jakewharton:butterknife:10.2.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
//
//
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'
// //butterknife依赖
// implementation 'com.jakewharton:butterknife:10.1.0'
// annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
//
@ -69,4 +59,9 @@ android {
//
implementation 'com.github.bumptech.glide:glide:4.8.0'
//
//
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'
}

View File

@ -8,16 +8,20 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar">
<activity android:name=".activity.HomeActivity"></activity>
android:theme="@style/AppTheme">
<activity android:name=".activity.MainActivity">
</activity>
<activity android:name=".activity.HomeActivity">
</activity>
<activity android:name=".activity.LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.LoginActivity"></activity>
</application>
</manifest>

View File

@ -1,107 +1,22 @@
package com.example.myapplication.activity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TableLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentPagerAdapter;
import android.os.Bundle;
import com.example.myapplication.base.BaseActivity;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import com.example.myapplication.R;
import com.example.myapplication.fragment.FindFragment;
import com.example.myapplication.fragment.MineFragment;
import com.example.myapplication.fragment.RecordFragment;
import com.example.myapplication.fragment.TreasureFragment;
import com.example.myapplication.util.NoSlideViewPager;
import com.google.android.material.tabs.TabLayout;
import com.gyf.immersionbar.ImmersionBar;
import java.util.ArrayList;
/**
* 创建首页布局展示
*/
public class HomeActivity extends BaseActivity {
private NoSlideViewPager mViewPager;
private TabLayout mTab;
private final String[] name = {"寻宝", "记录", "发现", "我的"};
private final int[] pic = {R.mipmap.map_select,R.mipmap.task_select,R.mipmap.article_select,R.mipmap.mine_select};
private final int[] pic1 = {R.mipmap.map,R.mipmap.task,R.mipmap.article,R.mipmap.mine};
public class HomeActivity extends BaseActivity{
@Override
protected int getLayout() {
return R.layout.activity_home;
return 0;
}
@Override
protected void initView() {
super.initView();
ImmersionBar.with(this)
.statusBarDarkFont(true, 0.2f)
//原理如果当前设备支持状态栏字体变色会设置状态栏字体为黑色如果当前设备不支持状态栏字体变色会使当前状态栏加上透明度否则不执行透明度
.init();
mTab=findViewById(R.id.tab_layout);
mViewPager=findViewById(R.id.no_slide_view_pager);
ArrayList<Fragment> fragments = new ArrayList<>();
fragments.add(new TreasureFragment());
fragments.add(new RecordFragment());
fragments.add(new FindFragment());
fragments.add(new MineFragment());
mViewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
@Override
public Fragment getItem(int i) {
return fragments.get(i);
}
@Override
public int getCount() {
return fragments.size();
}
});
mTab.setupWithViewPager(mViewPager);
mTab.getTabAt(0).setText(name[0]).setIcon(pic[0]);
mTab.getTabAt(1).setText(name[1]).setIcon(pic1[1]);
mTab.getTabAt(2).setText(name[2]).setIcon(pic1[2]);
mTab.getTabAt(3).setText(name[3]).setIcon(pic1[3]);
mTab.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
//禁止table layout效果
@Override
public void onTabSelected(TabLayout.Tab tab) {
mTab.getTabAt(tab.getPosition()).setIcon(pic[tab.getPosition()]);
}
//点击table layout效果
@Override
public void onTabUnselected(TabLayout.Tab tab) {
mTab.getTabAt(tab.getPosition()).setIcon(pic1[tab.getPosition()]);
}
@Override
public void onTabReselected(TabLayout.Tab tab) {
}
});
}
public View getTabView(String name,int image) {
View view = LayoutInflater.from(this).inflate(R.layout.item_tab, null);
TextView txt_title = (TextView) view.findViewById(R.id.txt_title);
txt_title.setText(name);
ImageView img_title = (ImageView) view.findViewById(R.id.img_title);
img_title.setImageResource(image);
return view;
}
@Override
protected void initData() {
super.initData();
}
}

View File

@ -9,7 +9,7 @@ import com.example.myapplication.base.BaseActivity;
public class LoginActivity extends BaseActivity {
@Override
protected int getLayout() {
return R.layout.login_activity;
return R.layout.activity_login;
}
@Override

View File

@ -2,21 +2,11 @@ package com.example.myapplication.activity;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import com.example.myapplication.R;
import com.example.myapplication.base.BaseActivity;
/**
* 启动页
*/
public class MainActivity extends BaseActivity {
@Override
@ -27,19 +17,6 @@ public class MainActivity extends BaseActivity {
@Override
protected void initData() {
super.initData();
new CountDownTimer(3000, 1000) {
@Override
public void onTick(long l) {
}
@Override
public void onFinish() {
Intent intent = new Intent(MainActivity.this, HomeActivity.class);
startActivity(intent);
finish();
}
}.start();
}
@Override

View File

@ -5,9 +5,6 @@ import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
@ -15,16 +12,15 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import com.example.myapplication.R;
import com.example.myapplication.api.UserApplication;
import com.gyf.immersionbar.ImmersionBar;
import butterknife.ButterKnife;
import butterknife.Unbinder;
public abstract class BaseActivity extends AppCompatActivity {
private Unbinder bind;
private AlertDialog alertDialog;
@Override
@ -35,7 +31,6 @@ public abstract class BaseActivity extends AppCompatActivity {
ImmersionBar.with(this).init();
Collector.addActivity(this);
setContentView(getLayout());
bind = ButterKnife.bind(this);
initMVP();
initView();
initData();
@ -47,14 +42,14 @@ public abstract class BaseActivity extends AppCompatActivity {
protected void initMVP() {
}
public void showLoadingDialog() {
alertDialog = new AlertDialog.Builder(this).create();
alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable());
alertDialog.setCancelable(false);
alertDialog.setOnKeyListener((dialog, keyCode, event) -> {
if (keyCode == KeyEvent.KEYCODE_SEARCH || keyCode == KeyEvent.KEYCODE_BACK)
return true;
return false;
});
// alertDialog = new AlertDialog.Builder(this).create();
// alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable());
// alertDialog.setCancelable(false);
// alertDialog.setOnKeyListener((dialog, keyCode, event) -> {
// if (keyCode == KeyEvent.KEYCODE_SEARCH || keyCode == KeyEvent.KEYCODE_BACK)
// return true;
// return false;
// });
//loading样式
//View view = LayoutInflater.from(this).inflate(R.layout.loading_alert, null);
//alertDialog.setView(view);
@ -91,7 +86,6 @@ public abstract class BaseActivity extends AppCompatActivity {
protected void onDestroy() {
super.onDestroy();
Collector.removeActivity(this);
bind.unbind();
}
/**
* 设置屏幕横竖屏切换

View File

@ -13,19 +13,18 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.Fragment;
import butterknife.ButterKnife;
import butterknife.Unbinder;
public abstract class BaseFragment extends Fragment {
private Unbinder bind;
private AlertDialog alertDialog;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View inflate = inflater.inflate(getLayout(), container, false);
bind = ButterKnife.bind(this, inflate);
initMvp();
initView();
initData();
@ -38,19 +37,20 @@ public abstract class BaseFragment extends Fragment {
protected abstract int getLayout();
public void showLoadingDialog() {
alertDialog = new AlertDialog.Builder(getActivity()).create();
alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable());
alertDialog.setCancelable(false);
alertDialog.setOnKeyListener((dialog, keyCode, event) -> {
if (keyCode == KeyEvent.KEYCODE_SEARCH || keyCode == KeyEvent.KEYCODE_BACK)
return true;
return false;
});
// alertDialog = new AlertDialog.Builder(getActivity()).create();
// alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable());
// alertDialog.setCancelable(false);
// alertDialog.setOnKeyListener((dialog, keyCode, event) -> {
// if (keyCode == KeyEvent.KEYCODE_SEARCH || keyCode == KeyEvent.KEYCODE_BACK)
// return true;
// return false;
//
// });
//loading样式
//View view = LayoutInflater.from(this).inflate(R.layout.loading, null);
//alertDialog.setView(view);
alertDialog.setCanceledOnTouchOutside(false);
alertDialog.show();
// alertDialog.setCanceledOnTouchOutside(false);
// alertDialog.show();
}
public void setLoadingDialogText(String s) {
@ -75,6 +75,6 @@ public abstract class BaseFragment extends Fragment {
@Override
public void onDestroyView() {
super.onDestroyView();
bind.unbind();
}
}

View File

@ -1,13 +1,23 @@
package com.example.myapplication.fragment;
import android.content.Intent;
import android.view.View;
import android.widget.TextView;
import com.example.myapplication.R;
import com.example.myapplication.base.BaseFragment;
import presenter.CapacityEvaluationPresenter;
/**
* 发现的Fragment
* 2021-5-25
*/
public class FindFragment extends BaseFragment {
@Override
protected int getLayout() {
return R.layout.find_fragment;
@ -22,4 +32,7 @@ public class FindFragment extends BaseFragment {
protected void initData() {
super.initData();
}
}

View File

@ -0,0 +1,7 @@
package model;
import com.example.myapplication.base.BaseModel;
public class CapacityEvaluationModel extends BaseModel {
}

View File

@ -0,0 +1,12 @@
package presenter;
import com.example.myapplication.base.BasePresenter;
import model.CapacityEvaluationModel;
public class CapacityEvaluationPresenter extends BasePresenter {
@Override
protected void initModel() {
}
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size android:width="3dp" android:height="6dp"/>
<solid android:color="@color/colorBack" />
</shape>

View File

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

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.HomeActivity">
tools:context="activity.HomeActivity">
<com.example.myapplication.util.NoSlideViewPager
android:id="@+id/no_slide_view_pager"

View File

@ -0,0 +1,119 @@
<?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="@mipmap/bg"
tools:context="activity.LoginActivity">
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="35dp"
android:layout_marginTop="70dp"
android:text="Welcome"
android:textColor="@color/colorWhite"
android:textSize="30sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_login_deck"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="35dp"
android:text="欢迎来到地图寻宝"
android:textColor="@color/colorWhite"
android:textSize="35sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_title" />
<TextView
android:id="@+id/login_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:text="用户名"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintLeft_toLeftOf="@id/tv_login_deck"
app:layout_constraintTop_toBottomOf="@id/tv_login_deck" />
<EditText
android:id="@+id/et_login_name"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="编码/手机号/邮箱"
android:paddingBottom="20dp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/login_name"
app:layout_constraintTop_toBottomOf="@id/login_name" />
<TextView
android:id="@+id/login_paw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:text="密码"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintLeft_toLeftOf="@id/et_login_name"
app:layout_constraintTop_toBottomOf="@id/et_login_name" />
<EditText
android:id="@+id/et_login_paw"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="请输入密码"
android:paddingBottom="15dp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/login_paw"
app:layout_constraintTop_toBottomOf="@id/login_paw" />
<CheckBox
android:id="@+id/cb_disclaimer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/colorWhite"
android:text="免责声明"
android:scaleX="0.7"
android:scaleY="0.7"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintLeft_toLeftOf="@id/et_login_paw"
app:layout_constraintTop_toBottomOf="@id/et_login_paw" />
<TextView
android:id="@+id/tv_register"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="注册"
android:textColor="@color/colorWhite"
android:textSize="12sp"
app:layout_constraintRight_toLeftOf="@id/tv_forget_paw"
app:layout_constraintTop_toBottomOf="@id/et_login_paw"
android:layout_marginTop="8dp"
/>
<TextView
android:id="@+id/tv_forget_paw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="忘记密码"
android:textColor="@color/colorWhite"
android:textSize="12sp"
app:layout_constraintRight_toRightOf="@id/et_login_paw"
app:layout_constraintTop_toBottomOf="@id/et_login_paw" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ic_launcher_background"
tools:context=".activity.MainActivity">
tools:context="activity.MainActivity">
<TextView
android:id="@+id/tv_view"

View File

@ -6,11 +6,46 @@
android:layout_height="match_parent">
<TextView
android:id="@+id/tv_announcement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="发现的Fragment"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:text="最新公告"
android:textSize="16dp"
android:textColor="@color/colorBack"
android:layout_margin="10dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
/>
<TextView
android:id="@+id/tv_help_center"
android:layout_width="match_parent"
android:layout_height="50dp"
android:text="帮助中心"
android:textSize="16dp"
android:background="@color/colorWhite"
android:textColor="@color/colorBack"
android:layout_marginTop="10dp"
android:paddingLeft="20dp"
app:layout_constraintTop_toBottomOf="@+id/tv_announcement"
app:layout_constraintLeft_toLeftOf="parent"/>
<TextView
android:id="@+id/tv_task_explain"
android:layout_width="150dp"
android:layout_height="100dp"
android:text="任务说明"
android:gravity="center"
android:background="@drawable/tv_explain"
app:layout_constraintTop_toBottomOf="@id/tv_help_center"
app:layout_constraintLeft_toLeftOf="parent"/>
<TextView
android:id="@+id/tv_capacity_evaluation"
android:layout_width="150dp"
android:layout_height="100dp"
android:text="能力测评"
android:gravity="center"
android:background="@drawable/tv_explain"
app:layout_constraintTop_toBottomOf="@id/tv_help_center"
app:layout_constraintLeft_toRightOf="@+id/tv_task_explain"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

View File

@ -0,0 +1,28 @@
<?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/nav_graph"
app:startDestination="@id/FirstFragment">
<fragment
android:id="@+id/FirstFragment"
android:name="com.example.myapplication.activity.FirstFragment"
android:label="@string/first_fragment_label"
tools:layout="@layout/fragment_first">
<action
android:id="@+id/action_FirstFragment_to_SecondFragment"
app:destination="@id/SecondFragment" />
</fragment>
<fragment
android:id="@+id/SecondFragment"
android:name="com.example.myapplication.activity.SecondFragment"
android:label="@string/second_fragment_label"
tools:layout="@layout/fragment_second">
<action
android:id="@+id/action_SecondFragment_to_FirstFragment"
app:destination="@id/FirstFragment" />
</fragment>
</navigation>

View File

@ -3,4 +3,8 @@
<color name="colorPrimary">#6200EE</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#03DAC5</color>
<color name="colorBack">#000000</color>
<color name="colorGrey">#FAFAFA</color>
<color name="colorWhite">#ffffff</color>
<color name="colorTransparent">#7fffffff</color>
</resources>

View File

@ -1,6 +1,6 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
@ -15,5 +15,20 @@
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<!-- <style name="MyEditText" parent="Theme.AppCompat.Light">&ndash;&gt;-->
<!-- <item name="colorControlNormal">@color/colorWhite</item>-->
<!-- </style>-->
<!-- 设置Editext下划线颜色-->
<style name="MyEditText" parent="Theme.AppCompat.Light">
<item name="colorControlNormal">@android:color/darker_gray</item>
<item name="colorControlActivated">@android:color/darker_gray</item>
</style>
<!-- 设置Checkbox边框大小-->
<!-- <style-->
<!-- name="MyCheckBox"-->
<!-- parent="@android:style/Widget.CompoundButton.CheckBox">-->
<!-- <item name="android:button">-->
<!-- -->
<!-- </item>-->
<!-- </style>-->
</resources>

View File

@ -15,5 +15,9 @@ org.gradle.jvmargs=-Xmx2048m
# 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
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=1080
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=1080
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true