@ -0,0 +1,214 @@
|
||||
/*
|
||||
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://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.
|
||||
*/
|
||||
|
||||
package net.micode.notes.account;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* 账户管理工具类
|
||||
* 负责用户登录、注册、登出等账户管理功能
|
||||
*
|
||||
* 注意: 密码以明文形式存储在 SharedPreferences 中
|
||||
* 这仅用于学习目的,实际项目中应使用加密存储
|
||||
* 推荐使用 Android Keystore 或其他安全方案
|
||||
*/
|
||||
public class AccountManager {
|
||||
private static final String TAG = "AccountManager";
|
||||
private static final String PREF_NAME = "notes_preferences";
|
||||
|
||||
// 用户登录状态
|
||||
private static final String PREF_USER_LOGGED_IN = "pref_user_logged_in";
|
||||
|
||||
// 当前登录用户名
|
||||
private static final String PREF_CURRENT_USERNAME = "pref_current_username";
|
||||
|
||||
// 用户数据前缀 (用于存储多个用户)
|
||||
private static final String PREF_USER_DATA_PREFIX = "pref_user_data_";
|
||||
|
||||
// 用户密码后缀 (格式: pref_user_data_<username>_password)
|
||||
private static final String PREF_USER_PASSWORD_SUFFIX = "_password";
|
||||
|
||||
/**
|
||||
* 检查用户是否已登录
|
||||
* @param context 上下文对象
|
||||
* @return 如果已登录返回true,否则返回false
|
||||
*/
|
||||
public static boolean isUserLoggedIn(Context context) {
|
||||
try {
|
||||
SharedPreferences sp = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
|
||||
return sp.getBoolean(PREF_USER_LOGGED_IN, false);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error checking login status", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录用户名
|
||||
* @param context 上下文对象
|
||||
* @return 当前登录用户名,如果未登录则返回空字符串
|
||||
*/
|
||||
public static String getCurrentUser(Context context) {
|
||||
try {
|
||||
SharedPreferences sp = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
|
||||
return sp.getString(PREF_CURRENT_USERNAME, "");
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error getting current user", e);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户登录验证
|
||||
* @param context 上下文对象
|
||||
* @param username 用户名
|
||||
* @param password 密码
|
||||
* @return 登录成功返回true,失败返回false
|
||||
*/
|
||||
public static boolean login(Context context, String username, String password) {
|
||||
if (username == null || username.isEmpty()) {
|
||||
Log.w(TAG, "Empty username provided");
|
||||
return false;
|
||||
}
|
||||
if (password == null || password.isEmpty()) {
|
||||
Log.w(TAG, "Empty password provided");
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
SharedPreferences sp = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
|
||||
String storedPassword = sp.getString(getUserPasswordKey(username), "");
|
||||
|
||||
if (storedPassword.equals(password)) {
|
||||
SharedPreferences.Editor editor = sp.edit();
|
||||
editor.putBoolean(PREF_USER_LOGGED_IN, true);
|
||||
editor.putString(PREF_CURRENT_USERNAME, username);
|
||||
boolean result = editor.commit();
|
||||
|
||||
if (result) {
|
||||
Log.d(TAG, "User logged in successfully: " + username);
|
||||
} else {
|
||||
Log.e(TAG, "Failed to save login status");
|
||||
}
|
||||
|
||||
return result;
|
||||
} else {
|
||||
Log.w(TAG, "Login failed: incorrect password for user " + username);
|
||||
return false;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error during login", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册新用户
|
||||
* @param context 上下文对象
|
||||
* @param username 用户名
|
||||
* @param password 密码
|
||||
* @return 注册成功返回true,失败返回false
|
||||
*/
|
||||
public static boolean register(Context context, String username, String password) {
|
||||
if (username == null || username.isEmpty()) {
|
||||
Log.w(TAG, "Empty username provided");
|
||||
return false;
|
||||
}
|
||||
if (password == null || password.isEmpty()) {
|
||||
Log.w(TAG, "Empty password provided");
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
SharedPreferences sp = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
|
||||
String userPasswordKey = getUserPasswordKey(username);
|
||||
|
||||
if (sp.contains(userPasswordKey)) {
|
||||
Log.w(TAG, "Registration failed: user already exists - " + username);
|
||||
return false;
|
||||
}
|
||||
|
||||
SharedPreferences.Editor editor = sp.edit();
|
||||
editor.putString(userPasswordKey, password);
|
||||
boolean result = editor.commit();
|
||||
|
||||
if (result) {
|
||||
Log.d(TAG, "User registered successfully: " + username);
|
||||
} else {
|
||||
Log.e(TAG, "Failed to register user");
|
||||
}
|
||||
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error during registration", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户登出
|
||||
* @param context 上下文对象
|
||||
* @return 登出成功返回true,失败返回false
|
||||
*/
|
||||
public static boolean logout(Context context) {
|
||||
try {
|
||||
SharedPreferences sp = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = sp.edit();
|
||||
editor.putBoolean(PREF_USER_LOGGED_IN, false);
|
||||
editor.putString(PREF_CURRENT_USERNAME, "");
|
||||
boolean result = editor.commit();
|
||||
|
||||
if (result) {
|
||||
Log.d(TAG, "User logged out successfully");
|
||||
} else {
|
||||
Log.e(TAG, "Failed to logout");
|
||||
}
|
||||
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error during logout", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查用户名是否已存在
|
||||
* @param context 上下文对象
|
||||
* @param username 用户名
|
||||
* @return 如果用户名已存在返回true,否则返回false
|
||||
*/
|
||||
public static boolean isUserExists(Context context, String username) {
|
||||
try {
|
||||
SharedPreferences sp = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
|
||||
return sp.contains(getUserPasswordKey(username));
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error checking if user exists", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户密码的存储Key
|
||||
* @param username 用户名
|
||||
* @return 存储Key
|
||||
*/
|
||||
private static String getUserPasswordKey(String username) {
|
||||
return PREF_USER_DATA_PREFIX + username + PREF_USER_PASSWORD_SUFFIX;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,112 @@
|
||||
/*
|
||||
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://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.
|
||||
*/
|
||||
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.micode.notes.R;
|
||||
import net.micode.notes.account.AccountManager;
|
||||
import com.google.android.material.appbar.MaterialToolbar;
|
||||
|
||||
public class LoginActivity extends Activity {
|
||||
private EditText etUsername;
|
||||
private EditText etPassword;
|
||||
private Button btnLogin;
|
||||
private Button btnCancel;
|
||||
private TextView tvRegister;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login);
|
||||
|
||||
MaterialToolbar toolbar = (MaterialToolbar) findViewById(R.id.toolbar);
|
||||
if (toolbar != null) {
|
||||
ActionBar actionBar = getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setDisplayShowTitleEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
initViews();
|
||||
setupListeners();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
etUsername = (EditText) findViewById(R.id.et_login_username);
|
||||
etPassword = (EditText) findViewById(R.id.et_login_password);
|
||||
btnLogin = (Button) findViewById(R.id.btn_login);
|
||||
btnCancel = (Button) findViewById(R.id.btn_login_cancel);
|
||||
tvRegister = (TextView) findViewById(R.id.tv_login_register);
|
||||
}
|
||||
|
||||
private void setupListeners() {
|
||||
btnLogin.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
handleLogin();
|
||||
}
|
||||
});
|
||||
|
||||
btnCancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
tvRegister.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void handleLogin() {
|
||||
String username = etUsername.getText().toString().trim();
|
||||
String password = etPassword.getText().toString().trim();
|
||||
|
||||
if (TextUtils.isEmpty(username)) {
|
||||
Toast.makeText(this, R.string.error_username_empty, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(password)) {
|
||||
Toast.makeText(this, R.string.error_password_empty, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if (AccountManager.login(this, username, password)) {
|
||||
Toast.makeText(this, R.string.toast_login_success, Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
} else {
|
||||
Toast.makeText(this, R.string.error_login_failed, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,113 @@
|
||||
/*
|
||||
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://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.
|
||||
*/
|
||||
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.micode.notes.R;
|
||||
import net.micode.notes.account.AccountManager;
|
||||
import com.google.android.material.appbar.MaterialToolbar;
|
||||
|
||||
public class RegisterActivity extends Activity {
|
||||
private EditText etUsername;
|
||||
private EditText etPassword;
|
||||
private EditText etConfirmPassword;
|
||||
private Button btnRegister;
|
||||
private Button btnCancel;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_register);
|
||||
|
||||
MaterialToolbar toolbar = (MaterialToolbar) findViewById(R.id.toolbar);
|
||||
if (toolbar != null) {
|
||||
ActionBar actionBar = getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setDisplayShowTitleEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
initViews();
|
||||
setupListeners();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
etUsername = (EditText) findViewById(R.id.et_register_username);
|
||||
etPassword = (EditText) findViewById(R.id.et_register_password);
|
||||
etConfirmPassword = (EditText) findViewById(R.id.et_register_confirm_password);
|
||||
btnRegister = (Button) findViewById(R.id.btn_register);
|
||||
btnCancel = (Button) findViewById(R.id.btn_register_cancel);
|
||||
}
|
||||
|
||||
private void setupListeners() {
|
||||
btnRegister.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
handleRegister();
|
||||
}
|
||||
});
|
||||
|
||||
btnCancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void handleRegister() {
|
||||
String username = etUsername.getText().toString().trim();
|
||||
String password = etPassword.getText().toString().trim();
|
||||
String confirmPassword = etConfirmPassword.getText().toString().trim();
|
||||
|
||||
if (TextUtils.isEmpty(username)) {
|
||||
Toast.makeText(this, R.string.error_username_empty, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(password)) {
|
||||
Toast.makeText(this, R.string.error_password_empty, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!password.equals(confirmPassword)) {
|
||||
Toast.makeText(this, R.string.error_password_mismatch, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if (AccountManager.isUserExists(this, username)) {
|
||||
Toast.makeText(this, R.string.error_username_exists, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if (AccountManager.register(this, username, password)) {
|
||||
Toast.makeText(this, R.string.toast_register_success, Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
} else {
|
||||
Toast.makeText(this, R.string.error_register_failed, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/on_primary"
|
||||
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
|
||||
</vector>
|
||||
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/text_secondary"
|
||||
android:pathData="M12.5,20C17.2,20 21,16.2 21,11.5S17.2,3 12.5,3 4,6.8 4,11.5 7.8,20 12.5,20zM13,13h5v-2h-5V8h-2v3H6v2h5v3h2v-3z" />
|
||||
</vector>
|
||||
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#309760" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
|
||||
|
||||
</vector>
|
||||
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#309760" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6h1.9c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM18,20L6,20L6,10h12v10z"/>
|
||||
|
||||
</vector>
|
||||
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/surface"
|
||||
android:elevation="4dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/title_login"
|
||||
android:textSize="24sp"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginBottom="32dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_login_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_username"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:padding="12dp"
|
||||
android:background="@drawable/edit_white" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_login_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_login_password"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:padding="12dp"
|
||||
android:background="@drawable/edit_white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/btn_login"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:backgroundTint="@color/primary"
|
||||
style="?android:attr/buttonBarButtonStyle" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_login_cancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@android:string/cancel"
|
||||
android:backgroundTint="@color/primary"
|
||||
style="?android:attr/buttonBarButtonStyle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_login_register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/text_register_account"
|
||||
android:textColor="@color/text_link"
|
||||
android:layout_marginTop="24dp"
|
||||
android:padding="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/surface"
|
||||
android:elevation="4dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/title_register"
|
||||
android:textSize="24sp"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="32dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_register_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_username"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:padding="12dp"
|
||||
android:background="@drawable/edit_white" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_register_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_login_password"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:padding="12dp"
|
||||
android:background="@drawable/edit_white" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_register_confirm_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_confirm_password"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:padding="12dp"
|
||||
android:background="@drawable/edit_white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_register_cancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@android:string/cancel"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:backgroundTint="@color/primary"
|
||||
style="?android:attr/buttonBarButtonStyle" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_register"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/btn_register"
|
||||
android:layout_marginStart="8dp"
|
||||
android:backgroundTint="@color/primary"
|
||||
style="?android:attr/buttonBarButtonStyle" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
||||
|
||||
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
|
||||
|
||||
http://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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="50dip"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/preferences_add_account" />
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/camera_preview_title"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/preview_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:contentDescription="@string/camera_preview_image" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_retake"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/camera_retake"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/camera_confirm"
|
||||
android:layout_marginStart="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="8dp"
|
||||
app:cardBackgroundColor="@color/surface"
|
||||
app:strokeColor="@color/outline"
|
||||
app:strokeWidth="1dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:contentPadding="0dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp">
|
||||
|
||||
<!-- 标题区域 -->
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:text="@string/image_insert_title"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/text_primary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- 图库选项卡片 -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/btn_gallery"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:padding="16dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_text"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gallery_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@android:drawable/ic_menu_gallery"
|
||||
app:tint="@color/primary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gallery_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/image_insert_gallery"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintStart_toEndOf="@id/gallery_icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- 分隔线 -->
|
||||
<View
|
||||
android:id="@+id/divider1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@color/divider"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_gallery"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- 相机选项卡片 -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/btn_camera"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:padding="16dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/camera_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@android:drawable/ic_menu_camera"
|
||||
app:tint="@color/primary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/camera_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/image_insert_camera"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintStart_toEndOf="@id/camera_icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- 分隔线 -->
|
||||
<View
|
||||
android:id="@+id/divider2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@color/divider"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_camera"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- 取消按钮 -->
|
||||
<TextView
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:padding="16dp"
|
||||
android:text="@android:string/cancel"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/primary"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:background="@android:color/white"
|
||||
android:padding="4dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:maxHeight="400dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/image_content_description" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_delete"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="top|end"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@android:drawable/ic_menu_delete"
|
||||
android:contentDescription="@string/delete_image" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|start"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@android:color/holo_blue_light"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</FrameLayout>
|
||||
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
||||
|
||||
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
|
||||
|
||||
http://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.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<!-- Dark Mode Color Overrides -->
|
||||
<!-- Background Colors -->
|
||||
<color name="background">#121212</color>
|
||||
<color name="surface">#1E1E1E</color>
|
||||
<color name="surface_variant">#2D2D2D</color>
|
||||
|
||||
<!-- Text Colors -->
|
||||
<color name="text_primary">#E0E0E0</color>
|
||||
<color name="text_secondary">#A0A0A0</color>
|
||||
<color name="text_hint">#757575</color>
|
||||
|
||||
<!-- On Colors -->
|
||||
<color name="on_background">#E0E0E0</color>
|
||||
<color name="on_surface">#E0E0E0</color>
|
||||
<color name="on_surface_variant">#B0B0B0</color>
|
||||
|
||||
<!-- Note Background Colors (Dark Mode) -->
|
||||
<color name="note_bg_yellow">#4A4536</color>
|
||||
<color name="note_bg_red">#4A3636</color>
|
||||
<color name="note_bg_blue">#364A5A</color>
|
||||
<color name="note_bg_green">#364A3E</color>
|
||||
<color name="note_bg_white">#1E1E1E</color>
|
||||
|
||||
<!-- Divider Colors -->
|
||||
<color name="divider">#2D2D2D</color>
|
||||
<color name="outline">#404040</color>
|
||||
|
||||
<!-- Ripple Effect -->
|
||||
<color name="ripple">#3352D399</color>
|
||||
|
||||
<!-- Status Bar & Navigation Bar -->
|
||||
<color name="status_bar">#121212</color>
|
||||
<color name="navigation_bar">#121212</color>
|
||||
</resources>
|
||||
@ -1,7 +1,20 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.Notesmaster" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your dark theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||
<!-- Base application theme for dark mode. -->
|
||||
<style name="Base.Theme.NotesMaster" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Override light status bar and navigation bar for dark mode -->
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
|
||||
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
|
||||
|
||||
<!-- Ensure proper contrast for dark mode -->
|
||||
<item name="android:textColorPrimary">@color/text_primary</item>
|
||||
<item name="android:textColorSecondary">@color/text_secondary</item>
|
||||
<item name="android:textColorHint">@color/text_hint</item>
|
||||
</style>
|
||||
|
||||
<!-- NoteTheme dark mode overrides (inherits from Theme.NotesMaster) -->
|
||||
<style name="NoteTheme" parent="Theme.NotesMaster">
|
||||
<!-- Override for dark mode -->
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
|
||||
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
|
||||
</style>
|
||||
</resources>
|
||||
@ -1,9 +1,45 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.Notesmaster" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your light theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||
<!-- Base application theme with Material Design 3 -->
|
||||
<style name="Base.Theme.NotesMaster" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Primary Colors -->
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
<item name="colorOnPrimary">@color/on_primary</item>
|
||||
<item name="colorPrimaryContainer">@color/primary_container</item>
|
||||
<item name="colorOnPrimaryContainer">@color/on_primary_container</item>
|
||||
|
||||
<!-- Secondary Colors -->
|
||||
<item name="colorSecondary">@color/secondary</item>
|
||||
<item name="colorOnSecondary">@color/on_secondary</item>
|
||||
<item name="colorSecondaryContainer">@color/secondary_container</item>
|
||||
<item name="colorOnSecondaryContainer">@color/on_secondary_container</item>
|
||||
|
||||
<!-- Background & Surface Colors -->
|
||||
<item name="android:windowBackground">@color/background</item>
|
||||
<item name="android:colorBackground">@color/background</item>
|
||||
<item name="colorSurface">@color/surface</item>
|
||||
<item name="colorOnSurface">@color/on_surface</item>
|
||||
<item name="colorOnSurfaceVariant">@color/on_surface_variant</item>
|
||||
|
||||
<!-- Error Colors -->
|
||||
<item name="colorError">@color/error</item>
|
||||
<item name="colorOnError">@color/on_error</item>
|
||||
<item name="colorErrorContainer">@color/error_container</item>
|
||||
<item name="colorOnErrorContainer">@color/on_error</item>
|
||||
|
||||
<!-- Text Colors -->
|
||||
<item name="android:textColorPrimary">@color/text_primary</item>
|
||||
<item name="android:textColorSecondary">@color/text_secondary</item>
|
||||
<item name="android:textColorHint">@color/text_hint</item>
|
||||
|
||||
<!-- Ripple Effect -->
|
||||
<item name="android:colorControlHighlight">@color/ripple</item>
|
||||
|
||||
<!-- Status Bar & Navigation Bar -->
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
|
||||
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Notesmaster" parent="Base.Theme.Notesmaster" />
|
||||
<style name="Theme.NotesMaster" parent="Base.Theme.NotesMaster" />
|
||||
</resources>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<external-files-path name="external_files" path="." />
|
||||
<files-path name="files" path="." />
|
||||
<cache-path name="cache" path="." />
|
||||
<external-path name="external" path="." />
|
||||
</paths>
|
||||
Loading…
Reference in new issue