版本V1.0.0(1)
17
.gitignore
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
*.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
|
||||||
|
.idea/
|
||||||
|
app/release/
|
||||||
1
app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
BIN
app/SecurityLocks.jks
Normal file
67
app/build.gradle.kts
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Date
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
alias(libs.plugins.android.application)
|
||||||
|
id("org.jetbrains.kotlin.android")
|
||||||
|
id ("kotlin-kapt")
|
||||||
|
}
|
||||||
|
val timestamp = SimpleDateFormat("MM_dd_HH_mm").format(Date())
|
||||||
|
android {
|
||||||
|
namespace = "com.lc.myapplication.security.locks"
|
||||||
|
compileSdk = 34
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "com.lc.applock.security.locks"
|
||||||
|
minSdk = 23
|
||||||
|
targetSdk = 34
|
||||||
|
versionCode = 1
|
||||||
|
versionName = "1.0.0"
|
||||||
|
setProperty("archivesBaseName", "AppLockMaster_v${versionName}_(${versionCode})_$timestamp")
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = true
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
viewBinding = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
implementation(libs.appcompat)
|
||||||
|
implementation(libs.material)
|
||||||
|
implementation(libs.activity)
|
||||||
|
implementation(libs.constraintlayout)
|
||||||
|
testImplementation(libs.junit)
|
||||||
|
androidTestImplementation(libs.ext.junit)
|
||||||
|
androidTestImplementation(libs.espresso.core)
|
||||||
|
implementation ("com.github.bumptech.glide:glide:4.16.0")
|
||||||
|
implementation("androidx.activity:activity-compose:1.8.2")
|
||||||
|
implementation("com.google.android.material:material:1.11.0")
|
||||||
|
implementation ("com.google.code.gson:gson:2.10.1")
|
||||||
|
|
||||||
|
val room_version = "2.6.1"
|
||||||
|
implementation("androidx.room:room-runtime:$room_version")
|
||||||
|
annotationProcessor("androidx.room:room-compiler:$room_version")
|
||||||
|
kapt("androidx.room:room-compiler:$room_version")
|
||||||
|
implementation("androidx.room:room-ktx:$room_version")
|
||||||
|
implementation("androidx.room:room-rxjava2:$room_version")
|
||||||
|
implementation("androidx.room:room-rxjava3:$room_version")
|
||||||
|
implementation("androidx.room:room-guava:$room_version")
|
||||||
|
testImplementation("androidx.room:room-testing:$room_version")
|
||||||
|
implementation("androidx.room:room-paging:$room_version")
|
||||||
|
}
|
||||||
6
app/info
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
包名:com.lc.applock.security.locks
|
||||||
|
应用名:App Lock Master
|
||||||
|
签名文件:SecurityLocks.jks
|
||||||
|
签名文件路径:D:\AndroidProjects\SecurityLocks\app
|
||||||
|
别名:SecurityLocks0
|
||||||
|
密码:Security Locks
|
||||||
21
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# 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
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.lc.myapplication.security.locks;
|
||||||
|
|
||||||
|
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.lc.myapplication.security.locks", appContext.getPackageName());
|
||||||
|
}
|
||||||
|
}
|
||||||
62
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||||
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
|
<uses-permission
|
||||||
|
android:name="android.permission.PACKAGE_USAGE_STATS"
|
||||||
|
tools:ignore="ProtectedPermissions" />
|
||||||
|
|
||||||
|
<queries>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:name=".Securitylocks"
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
|
android:icon="@mipmap/logo"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:roundIcon="@mipmap/logo"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/Theme.SecurityLocks"
|
||||||
|
tools:targetApi="31">
|
||||||
|
<activity
|
||||||
|
android:name=".activity.TestimonialsActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activity.AllAppActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activity.LockedAppActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activity.PassCodeActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".activity.IntoActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".activity.MainActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
<service android:name=".tool.MyService"/>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
package com.lc.myapplication.security.locks;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockDataBase;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockEntity;
|
||||||
|
import com.lc.myapplication.security.locks.tool.AppsManager;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyTools;
|
||||||
|
import com.lc.myapplication.security.locks.value.MeValues;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public class Securitylocks extends Application {
|
||||||
|
public static List<SecurityLockEntity> securityLockEntities = new ArrayList<>();
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
MeValues.lock = this;
|
||||||
|
MyTools.init(this);
|
||||||
|
Set<SecurityLockEntity> entities = AppsManager.queryapps(this);
|
||||||
|
//Log.d("--------en1","----------"+entities.size());
|
||||||
|
AppsManager.insertEntity(entities);
|
||||||
|
// Log.d("--------en2","----------"+securityLockEntities.size());
|
||||||
|
MyTools.RUNIO(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
securityLockEntities = SecurityLockDataBase.getSecurityLockDataBase().getsecurityLockDAO().GetAllapp();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//Log.d("--------en3","----------"+securityLockEntities.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
package com.lc.myapplication.security.locks.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.R;
|
||||||
|
import com.lc.myapplication.security.locks.Securitylocks;
|
||||||
|
import com.lc.myapplication.security.locks.adapter.AllAppsAdapter;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockDataBase;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockEntity;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyService;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyTools;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AllAppActivity extends AppCompatActivity {
|
||||||
|
private LinearLayout all_main;
|
||||||
|
|
||||||
|
private RecyclerView all_apps_view;
|
||||||
|
private ImageView all_apps_back;
|
||||||
|
private List<SecurityLockEntity> list;
|
||||||
|
@SuppressLint("MissingInflatedId")
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_all_app);
|
||||||
|
all_apps_view = findViewById(R.id.all_apps_view);
|
||||||
|
all_apps_back = findViewById(R.id.all_apps_back);
|
||||||
|
all_main = findViewById(R.id.all_main);
|
||||||
|
initbackground();
|
||||||
|
onMyClick();
|
||||||
|
gotoGetRecycle();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onMyClick() {
|
||||||
|
all_apps_back.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initbackground() {
|
||||||
|
Window window = getWindow();
|
||||||
|
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||||
|
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||||
|
all_main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void gotoGetRecycle() {
|
||||||
|
MyTools.RUNIO(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
list = SecurityLockDataBase.getSecurityLockDataBase().getsecurityLockDAO().GetAllapp();
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
AllAppsAdapter allAppsAdapter = new AllAppsAdapter(AllAppActivity.this, list);
|
||||||
|
all_apps_view.setAdapter(allAppsAdapter);
|
||||||
|
all_apps_view.setLayoutManager(new GridLayoutManager(AllAppActivity.this,3));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
package com.lc.myapplication.security.locks.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.CountDownTimer;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyTools;
|
||||||
|
import com.lc.myapplication.security.locks.R;
|
||||||
|
|
||||||
|
public class IntoActivity extends AppCompatActivity {
|
||||||
|
private CountDownTimer timer;
|
||||||
|
|
||||||
|
@SuppressLint("MissingInflatedId")
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_into);
|
||||||
|
timer = new CountDownTimer(1000, 500) {
|
||||||
|
@Override
|
||||||
|
public void onTick(long millisUntilFinished) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinish() {
|
||||||
|
startSwitchActivity();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
timego();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startSwitchActivity() {
|
||||||
|
String firstkey = MyTools.getPassword();
|
||||||
|
if (firstkey.isEmpty()){
|
||||||
|
startActivity(new Intent(IntoActivity.this, PassCodeActivity.class));
|
||||||
|
finish();
|
||||||
|
}else {
|
||||||
|
startActivity(new Intent(IntoActivity.this, MainActivity.class));
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void timego() {
|
||||||
|
timer.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
timer.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
package com.lc.myapplication.security.locks.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.R;
|
||||||
|
import com.lc.myapplication.security.locks.Securitylocks;
|
||||||
|
import com.lc.myapplication.security.locks.adapter.LockedAppAdapter;
|
||||||
|
import com.lc.myapplication.security.locks.draw.MySpace;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockDataBase;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockEntity;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyTools;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LockedAppActivity extends AppCompatActivity {
|
||||||
|
private RecyclerView locked_app;
|
||||||
|
private ImageView locked_back;
|
||||||
|
private boolean islock = true;
|
||||||
|
private LinearLayout locked_main;
|
||||||
|
private List<SecurityLockEntity> list;
|
||||||
|
@SuppressLint("MissingInflatedId")
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_locked_app);
|
||||||
|
locked_app = findViewById(R.id.locked_apps_view);
|
||||||
|
locked_back = findViewById(R.id.locked_back);
|
||||||
|
locked_main = findViewById(R.id.locked_main);
|
||||||
|
initbackground();
|
||||||
|
locked_back.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
gotoGetLockedList();
|
||||||
|
//gotoGetRecycle();
|
||||||
|
}
|
||||||
|
private void initbackground() {
|
||||||
|
Window window = getWindow();
|
||||||
|
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||||
|
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||||
|
locked_main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
}
|
||||||
|
private void gotoGetLockedList() {
|
||||||
|
MyTools.RUNIO(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
list = SecurityLockDataBase.getSecurityLockDataBase().getsecurityLockDAO().GetLockedApp(islock);
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
gotoGetRecycle();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
private void gotoGetRecycle() {
|
||||||
|
MySpace mySpace = new MySpace(5,20,3);
|
||||||
|
GridLayoutManager gridLayoutManager = new GridLayoutManager(this,3);
|
||||||
|
locked_app.setLayoutManager(gridLayoutManager);
|
||||||
|
locked_app.addItemDecoration(mySpace);
|
||||||
|
LockedAppAdapter lockedAppAdapter = new LockedAppAdapter(this,list);
|
||||||
|
locked_app.setAdapter(lockedAppAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,125 @@
|
|||||||
|
package com.lc.myapplication.security.locks.activity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.dialog.PermissionDialog;
|
||||||
|
import com.lc.myapplication.security.locks.dialog.SettingDialog;
|
||||||
|
import com.lc.myapplication.security.locks.tool.LockPremission;
|
||||||
|
import com.lc.myapplication.security.locks.R;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyService;
|
||||||
|
|
||||||
|
|
||||||
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
private LinearLayout main_lin;
|
||||||
|
private LockPremission lockPremission;
|
||||||
|
|
||||||
|
private RelativeLayout main_re_lay1;
|
||||||
|
private RelativeLayout main_re2_lay1;
|
||||||
|
private RelativeLayout main_re2_lay2;
|
||||||
|
private ImageView main_set;
|
||||||
|
private PermissionDialog permissionDialog;
|
||||||
|
private SettingDialog settingDialog;
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_main);
|
||||||
|
initfindview();
|
||||||
|
startService(new Intent(this, MyService.class));
|
||||||
|
initpaperbackground();
|
||||||
|
onMyClick();
|
||||||
|
getPremission();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onMyClick() {
|
||||||
|
main_re_lay1.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(MainActivity.this,LockedAppActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
main_re2_lay1.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(MainActivity.this,TestimonialsActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
main_re2_lay2.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(MainActivity.this,AllAppActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
main_set.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
getsettingDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getsettingDialog() {
|
||||||
|
if (settingDialog == null){
|
||||||
|
settingDialog = new SettingDialog(this);
|
||||||
|
}
|
||||||
|
settingDialog.show(getSupportFragmentManager(),"-----settingdialog");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getPremission() {
|
||||||
|
boolean ispracy = LockPremission.privacysuccess(MainActivity.this);
|
||||||
|
boolean isshowon = LockPremission.showonsuccess(MainActivity.this);
|
||||||
|
if (ispracy && isshowon) {
|
||||||
|
hidedialog();
|
||||||
|
} else {
|
||||||
|
if (permissionDialog == null) {
|
||||||
|
permissionDialog = new PermissionDialog(this);
|
||||||
|
}
|
||||||
|
permissionDialog.show(getSupportFragmentManager(), "permissiondialog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void hidedialog() {
|
||||||
|
if (LockPremission.allpermiss(this)) {
|
||||||
|
if (permissionDialog != null) {
|
||||||
|
permissionDialog.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void initfindview() {
|
||||||
|
main_lin = findViewById(R.id.main_lin);
|
||||||
|
main_set = findViewById(R.id.main_set);
|
||||||
|
main_re_lay1 = findViewById(R.id.main_re_lay1);
|
||||||
|
main_re2_lay1 = findViewById(R.id.main_re2_lay1);
|
||||||
|
main_re2_lay2 = findViewById(R.id.main_re2_lay2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initpaperbackground() {
|
||||||
|
Window window = getWindow();
|
||||||
|
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||||
|
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||||
|
main_lin.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (settingDialog != null) {
|
||||||
|
settingDialog.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,130 @@
|
|||||||
|
package com.lc.myapplication.security.locks.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyTools;
|
||||||
|
import com.lc.myapplication.security.locks.R;
|
||||||
|
import com.lc.myapplication.security.locks.draw.DrawInputView;
|
||||||
|
import com.lc.myapplication.security.locks.listener.InputCodeFinishListener;
|
||||||
|
import com.lc.myapplication.security.locks.value.MeValues;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class PassCodeActivity extends AppCompatActivity {
|
||||||
|
private LinearLayout passcode_main;
|
||||||
|
private TextView passcode_name;
|
||||||
|
private TextView passcode_step;
|
||||||
|
private int type;
|
||||||
|
private String inputkey;
|
||||||
|
private DrawInputView drawInputView;
|
||||||
|
private ImageView image_back;
|
||||||
|
@SuppressLint("MissingInflatedId")
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_passcode_word);
|
||||||
|
type = getIntent().getIntExtra(MeValues.KEYCODE_TYPE,0);
|
||||||
|
initfindview();
|
||||||
|
int result = 0;
|
||||||
|
int resourceId = this.getResources().getIdentifier("status_bar_height", "dimen", "android");
|
||||||
|
if (resourceId > 0) {
|
||||||
|
result = this.getResources().getDimensionPixelSize(resourceId);
|
||||||
|
}
|
||||||
|
Log.d("------height","------height"+result);
|
||||||
|
gotoSwitchKeyType();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void gotoSwitchKeyType() {
|
||||||
|
if (type == 0){
|
||||||
|
image_back.setVisibility(View.GONE);
|
||||||
|
passcode_name.setText(getString(R.string.set_passcode));
|
||||||
|
passcode_step.setText(getString(R.string.passcode_next));
|
||||||
|
passcode_step.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(PassCodeActivity.this,PassCodeActivity.class);
|
||||||
|
intent.putExtra(MeValues.KEYCODE_TYPE,1);
|
||||||
|
intent.putExtra(MeValues.FIRST_KEY,inputkey);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else if (type == 1){
|
||||||
|
image_back.setVisibility(View.GONE);
|
||||||
|
passcode_name.setText(getString(R.string.setagain));
|
||||||
|
passcode_step.setText(getString(R.string.passcode_goon));
|
||||||
|
passcode_step.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
String passkey = getIntent().getStringExtra(MeValues.FIRST_KEY);
|
||||||
|
if (Objects.equals(passkey,inputkey)){
|
||||||
|
MyTools.setPassword(passkey);
|
||||||
|
Intent intent = new Intent(PassCodeActivity.this, MainActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}else {
|
||||||
|
Toast.makeText(PassCodeActivity.this,getString(R.string.code_not_same),Toast.LENGTH_LONG).show();
|
||||||
|
drawInputView.ClearInputCode();
|
||||||
|
passcode_step.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else if (type == 2){
|
||||||
|
image_back.setVisibility(View.VISIBLE);
|
||||||
|
passcode_name.setText(getString(R.string.change_passcode));
|
||||||
|
passcode_step.setText(getString(R.string.passcode_change));
|
||||||
|
passcode_step.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
changeKeycode();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
image_back.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
drawInputView.setInputFinish(new InputCodeFinishListener() {
|
||||||
|
@Override
|
||||||
|
public void CodeFinish(String code) {
|
||||||
|
passcode_step.setVisibility(View.VISIBLE);
|
||||||
|
inputkey = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void CodeNotFinish(String code) {
|
||||||
|
passcode_step.setVisibility(View.GONE);
|
||||||
|
inputkey = code;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void changeKeycode() {
|
||||||
|
MyTools.setPassword(inputkey);
|
||||||
|
Toast.makeText(PassCodeActivity.this, getString(R.string.change_success), Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initfindview() {
|
||||||
|
passcode_main = findViewById(R.id.passcode_main);
|
||||||
|
passcode_name = findViewById(R.id.passcode_name);
|
||||||
|
passcode_step = findViewById(R.id.passcode_step);
|
||||||
|
drawInputView = findViewById(R.id.passcode_draw_input);
|
||||||
|
image_back = findViewById(R.id.passcode_back);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
package com.lc.myapplication.security.locks.activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.R;
|
||||||
|
import com.lc.myapplication.security.locks.Securitylocks;
|
||||||
|
import com.lc.myapplication.security.locks.adapter.LockedAppAdapter;
|
||||||
|
import com.lc.myapplication.security.locks.adapter.TuijianAdapter;
|
||||||
|
import com.lc.myapplication.security.locks.draw.MySpace;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockDataBase;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockEntity;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyService;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyTools;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class TestimonialsActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private RecyclerView tuijian_re;
|
||||||
|
private ImageView tuijian_back;
|
||||||
|
private LinearLayout tuijain_main;
|
||||||
|
private List<SecurityLockEntity> list;
|
||||||
|
private boolean notlock = false;
|
||||||
|
@SuppressLint("MissingInflatedId")
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_testimonials);
|
||||||
|
tuijian_re = findViewById(R.id.tuijian_apps_view);
|
||||||
|
tuijian_back = findViewById(R.id.tuijian_back);
|
||||||
|
tuijain_main = findViewById(R.id.tuijian_main);
|
||||||
|
initbackground();
|
||||||
|
tuijian_back.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
getNotLocked();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getNotLocked() {
|
||||||
|
MyTools.RUNIO(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
list = SecurityLockDataBase.getSecurityLockDataBase().getsecurityLockDAO().GetLockedApp(notlock);
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
gotoGetRecycle();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void gotoGetRecycle() {
|
||||||
|
MySpace mySpace = new MySpace(5,20,3);
|
||||||
|
GridLayoutManager gridLayoutManager = new GridLayoutManager(this,3);
|
||||||
|
tuijian_re.setLayoutManager(gridLayoutManager);
|
||||||
|
tuijian_re.addItemDecoration(mySpace);
|
||||||
|
TuijianAdapter tuijianAdapter = new TuijianAdapter(this,list);
|
||||||
|
tuijian_re.setAdapter(tuijianAdapter);
|
||||||
|
}
|
||||||
|
private void initbackground() {
|
||||||
|
Window window = getWindow();
|
||||||
|
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||||
|
window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||||
|
tuijain_main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,102 @@
|
|||||||
|
package com.lc.myapplication.security.locks.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.databinding.AllAppsViewBinding;
|
||||||
|
import com.lc.myapplication.security.locks.listener.AppLockListener;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockDataBase;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockEntity;
|
||||||
|
import com.lc.myapplication.security.locks.tool.AppsManager;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyTools;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AllAppsAdapter extends RecyclerView.Adapter<AllAppsAdapter.AllAppVH> {
|
||||||
|
private Context mcon;
|
||||||
|
private List<SecurityLockEntity> securityLockEntities;
|
||||||
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return super.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllAppsAdapter(Context context, List<SecurityLockEntity> entities) {
|
||||||
|
mcon = context;
|
||||||
|
this.securityLockEntities = entities;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public AllAppVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
|
||||||
|
AllAppsViewBinding allAppsViewBinding = AllAppsViewBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false);
|
||||||
|
return new AllAppVH(allAppsViewBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull AllAppVH holder, int position) {
|
||||||
|
SecurityLockEntity entity = securityLockEntities.get(position);
|
||||||
|
String appsSign = entity.getApplsign();
|
||||||
|
holder.allAppsViewBinding.appReName.setText(appsSign);
|
||||||
|
Drawable drawable = AppsManager.getapplogo(mcon, entity.getApppakname());
|
||||||
|
holder.allAppsViewBinding.appReLogo.setImageDrawable(drawable);
|
||||||
|
|
||||||
|
// boolean locksuccess = entity.isLocksuccess();
|
||||||
|
boolean locksuccess = MyTools.getTest(entity.getApppakname());
|
||||||
|
Log.d("----sign1", "-locksuccess" + entity.getApppakname() + "----------" + locksuccess);
|
||||||
|
holder.allAppsViewBinding.appReSwitch.setOnCheckedChangeListener(null);
|
||||||
|
if (locksuccess) {
|
||||||
|
holder.allAppsViewBinding.appReSwitch.setChecked(true);
|
||||||
|
} else {
|
||||||
|
holder.allAppsViewBinding.appReSwitch.setChecked(false);
|
||||||
|
}
|
||||||
|
holder.allAppsViewBinding.appReSwitch.setChecked(entity.isLocksuccess());
|
||||||
|
holder.allAppsViewBinding.appReSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
|
MyTools.settest(entity.getApppakname(), locksuccess);
|
||||||
|
//Log.d("----sign1", "----------" + entity.getApppakname() + "-----sign1" + isChecked);
|
||||||
|
entity.setLocksuccess(isChecked);
|
||||||
|
//Log.d("----sign2", "----------" + isChecked);
|
||||||
|
MyTools.RUNIO(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
SecurityLockDataBase.getSecurityLockDataBase().getsecurityLockDAO().Updataentity(entity);
|
||||||
|
// Log.d("----sign2", "----------" + entity.getApppakname() + "--------" + entity.isLocksuccess());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return securityLockEntities.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AllAppVH extends RecyclerView.ViewHolder {
|
||||||
|
private AllAppsViewBinding allAppsViewBinding;
|
||||||
|
|
||||||
|
public AllAppVH(@NonNull AllAppsViewBinding itemView) {
|
||||||
|
super(itemView.getRoot());
|
||||||
|
allAppsViewBinding = itemView;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
package com.lc.myapplication.security.locks.adapter;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.databinding.BottomCodeViewBinding;
|
||||||
|
import com.lc.myapplication.security.locks.listener.BottomnumberClick;
|
||||||
|
|
||||||
|
public class BottomInputadapter extends RecyclerView.Adapter<BottomInputadapter.BottomViewHolder> {
|
||||||
|
|
||||||
|
private String[] bottomcodes = new String[]{"1","2","3","4","5","6","7","8","9","-10","0","-12"};
|
||||||
|
private BottomnumberClick bottomnumberClick;
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public BottomViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
BottomCodeViewBinding bottomCodeViewBinding = BottomCodeViewBinding.inflate(LayoutInflater.from(parent.getContext()),parent,false);
|
||||||
|
return new BottomViewHolder(bottomCodeViewBinding);
|
||||||
|
}
|
||||||
|
public void setBottomClick(BottomnumberClick bottomClick){
|
||||||
|
this.bottomnumberClick = bottomClick;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull BottomViewHolder holder, int position) {
|
||||||
|
String code = bottomcodes[position];
|
||||||
|
if (position == 9){
|
||||||
|
holder.bottomCodeViewBinding.bottomText.setVisibility(View.GONE);
|
||||||
|
holder.bottomCodeViewBinding.bottomImage.setVisibility(View.GONE);
|
||||||
|
}else if(position == 11){
|
||||||
|
holder.bottomCodeViewBinding.bottomText.setVisibility(View.GONE);
|
||||||
|
holder.bottomCodeViewBinding.bottomImage.setVisibility(View.VISIBLE);
|
||||||
|
}else {
|
||||||
|
holder.bottomCodeViewBinding.bottomText.setVisibility(View.VISIBLE);
|
||||||
|
holder.bottomCodeViewBinding.bottomText.setText(bottomcodes[position]);
|
||||||
|
holder.bottomCodeViewBinding.bottomImage.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
holder.bottomCodeViewBinding.bottomText.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
bottomnumberClick.numberClick(code);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
holder.bottomCodeViewBinding.bottomImage.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
bottomnumberClick.delete();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BottomViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private BottomCodeViewBinding bottomCodeViewBinding;
|
||||||
|
public BottomViewHolder(@NonNull BottomCodeViewBinding bottomViewBinding) {
|
||||||
|
super(bottomViewBinding.getRoot());
|
||||||
|
bottomCodeViewBinding = bottomViewBinding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package com.lc.myapplication.security.locks.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.databinding.LockedAppsViewBinding;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockDataBase;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockEntity;
|
||||||
|
import com.lc.myapplication.security.locks.tool.AppsManager;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyTools;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LockedAppAdapter extends RecyclerView.Adapter<LockedAppAdapter.LockedAppVH> {
|
||||||
|
private Context mcon;
|
||||||
|
private List<SecurityLockEntity> entityList;
|
||||||
|
public LockedAppAdapter(Context context, List<SecurityLockEntity> entities){
|
||||||
|
mcon = context;
|
||||||
|
entityList = entities;
|
||||||
|
}
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public LockedAppVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
LockedAppsViewBinding lockedAppsViewBinding = LockedAppsViewBinding.inflate(LayoutInflater.from(mcon),null,false);
|
||||||
|
return new LockedAppVH(lockedAppsViewBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull LockedAppVH holder, int position) {
|
||||||
|
SecurityLockEntity securityLockEntity = entityList.get(position);
|
||||||
|
holder.lockedAppsViewBinding.lockedReName.setText(securityLockEntity.getApplsign());
|
||||||
|
Drawable drawable = AppsManager.getapplogo(mcon,securityLockEntity.getApppakname());
|
||||||
|
holder.lockedAppsViewBinding.lockedReLogo.setImageDrawable(drawable);
|
||||||
|
holder.lockedAppsViewBinding.lockedReSwitch.setOnCheckedChangeListener(null);
|
||||||
|
holder.lockedAppsViewBinding.lockedReSwitch.setChecked(true);
|
||||||
|
holder.lockedAppsViewBinding.lockedReSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
|
securityLockEntity.setLocksuccess(isChecked);
|
||||||
|
MyTools.RUNIO(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
SecurityLockDataBase.getSecurityLockDataBase().getsecurityLockDAO().Updataentity(securityLockEntity);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return entityList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class LockedAppVH extends RecyclerView.ViewHolder {
|
||||||
|
private LockedAppsViewBinding lockedAppsViewBinding;
|
||||||
|
public LockedAppVH(@NonNull LockedAppsViewBinding itemView) {
|
||||||
|
super(itemView.getRoot());
|
||||||
|
lockedAppsViewBinding = itemView;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
package com.lc.myapplication.security.locks.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.databinding.TopCodeViewBinding;
|
||||||
|
|
||||||
|
import java.util.logging.Handler;
|
||||||
|
|
||||||
|
public class TopInputadapter extends RecyclerView.Adapter<TopInputadapter.TopViewHolder>{
|
||||||
|
|
||||||
|
private String topcode = "";
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public TopViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
TopCodeViewBinding topCodeViewBinding = TopCodeViewBinding.inflate(LayoutInflater.from(parent.getContext()),parent,false);
|
||||||
|
return new TopViewHolder(topCodeViewBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull TopViewHolder holder, int position) {
|
||||||
|
if (position == 0){
|
||||||
|
holder.topCodeViewBinding.topView.setVisibility(View.GONE);
|
||||||
|
}else {
|
||||||
|
holder.topCodeViewBinding.topView.setVisibility(View.VISIBLE);
|
||||||
|
holder.topCodeViewBinding.topImageKey.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
if (position >topcode.length() - 1){
|
||||||
|
holder.topCodeViewBinding.topImageKey.setSelected(true);
|
||||||
|
}else {
|
||||||
|
holder.topCodeViewBinding.topImageKey.setSelected(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
public void upDatakey(String code){
|
||||||
|
topcode = code;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class TopViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private TopCodeViewBinding topCodeViewBinding;
|
||||||
|
public TopViewHolder(@NonNull TopCodeViewBinding topViewBinding) {
|
||||||
|
super(topViewBinding.getRoot());
|
||||||
|
topCodeViewBinding = topViewBinding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
package com.lc.myapplication.security.locks.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.databinding.TuijianAppsViewBinding;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockDataBase;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockEntity;
|
||||||
|
import com.lc.myapplication.security.locks.tool.AppsManager;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyTools;
|
||||||
|
|
||||||
|
import java.sql.Array;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class TuijianAdapter extends RecyclerView.Adapter<TuijianAdapter.TuijianAppVH>{
|
||||||
|
private TuijianAppsViewBinding tuijianAppsViewBinding;
|
||||||
|
private List<SecurityLockEntity> securityLockEntities;
|
||||||
|
private Context mycon;
|
||||||
|
public TuijianAdapter(Context context,List<SecurityLockEntity> list){
|
||||||
|
mycon = context;
|
||||||
|
securityLockEntities = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public TuijianAppVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
tuijianAppsViewBinding = TuijianAppsViewBinding.inflate(LayoutInflater.from(mycon),null,false);
|
||||||
|
return new TuijianAppVH(tuijianAppsViewBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull TuijianAppVH holder, int position) {
|
||||||
|
SecurityLockEntity entity = securityLockEntities.get(position);
|
||||||
|
holder.tuijianAppsViewBinding.tuijianReName.setText(entity.getApplsign());
|
||||||
|
Drawable drawable = AppsManager.getapplogo(mycon,entity.getApppakname());
|
||||||
|
holder.tuijianAppsViewBinding.tuijianReLogo.setImageDrawable(drawable);
|
||||||
|
boolean locksuccess = MyTools.getTest(entity.getApppakname());
|
||||||
|
holder.tuijianAppsViewBinding.tuijianReSwitch.setOnCheckedChangeListener(null);
|
||||||
|
if (locksuccess) {
|
||||||
|
holder.tuijianAppsViewBinding.tuijianReSwitch.setChecked(true);
|
||||||
|
} else {
|
||||||
|
holder.tuijianAppsViewBinding.tuijianReSwitch.setChecked(false);
|
||||||
|
}
|
||||||
|
holder.tuijianAppsViewBinding.tuijianReSwitch.setChecked(entity.isLocksuccess());
|
||||||
|
holder.tuijianAppsViewBinding.tuijianReSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
|
MyTools.settest(entity.getApppakname(), locksuccess);
|
||||||
|
entity.setLocksuccess(isChecked);
|
||||||
|
MyTools.RUNIO(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
SecurityLockDataBase.getSecurityLockDataBase().getsecurityLockDAO().Updataentity(entity);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return securityLockEntities.size()/2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TuijianAppVH extends RecyclerView.ViewHolder {
|
||||||
|
TuijianAppsViewBinding tuijianAppsViewBinding;
|
||||||
|
public TuijianAppVH(@NonNull TuijianAppsViewBinding itemView) {
|
||||||
|
super(itemView.getRoot());
|
||||||
|
tuijianAppsViewBinding = itemView;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
package com.lc.myapplication.security.locks.dialog;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.Layout;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.DialogFragment;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.R;
|
||||||
|
import com.lc.myapplication.security.locks.databinding.PermissionDialogBinding;
|
||||||
|
import com.lc.myapplication.security.locks.tool.LockPremission;
|
||||||
|
import com.lc.myapplication.security.locks.tool.MyTools;
|
||||||
|
|
||||||
|
public class PermissionDialog extends DialogFragment {
|
||||||
|
private Context mcon;
|
||||||
|
private boolean privacysuccess;
|
||||||
|
private boolean showonsuccess;
|
||||||
|
private PermissionDialogBinding permissionDialogBinding;
|
||||||
|
public PermissionDialog(Context context){
|
||||||
|
mcon = context;
|
||||||
|
}
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
permissionDialogBinding = PermissionDialogBinding.inflate(inflater,null,false);
|
||||||
|
initdialog();
|
||||||
|
return permissionDialogBinding.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initdialog() {
|
||||||
|
Window window = getDialog().getWindow();
|
||||||
|
WindowManager.LayoutParams wl = window.getAttributes();
|
||||||
|
wl.gravity = Gravity.BOTTOM;
|
||||||
|
wl.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||||
|
wl.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||||
|
window.setAttributes(wl);
|
||||||
|
if (privacysuccess && showonsuccess){
|
||||||
|
setCancelable(true);
|
||||||
|
}else {
|
||||||
|
setCancelable(false);
|
||||||
|
}
|
||||||
|
permissionDialogBinding.dialogFra.setVisibility(View.VISIBLE);
|
||||||
|
permissionDialogBinding.dialogButton1.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
LockPremission.Privacypremit(mcon);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
permissionDialogBinding.dialogButton2.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
LockPremission.ShowOnpremit(mcon);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
frashButton();
|
||||||
|
initdialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void frashButton() {
|
||||||
|
privacysuccess = LockPremission.privacysuccess(mcon);
|
||||||
|
showonsuccess = LockPremission.showonsuccess(mcon);
|
||||||
|
permissionDialogBinding.dialogButton1.setSelected(privacysuccess);
|
||||||
|
permissionDialogBinding.dialogButton2.setSelected(showonsuccess);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,75 @@
|
|||||||
|
package com.lc.myapplication.security.locks.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.DialogFragment;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.R;
|
||||||
|
import com.lc.myapplication.security.locks.activity.PassCodeActivity;
|
||||||
|
import com.lc.myapplication.security.locks.databinding.PermissionDialogBinding;
|
||||||
|
import com.lc.myapplication.security.locks.databinding.SettingDialogBinding;
|
||||||
|
import com.lc.myapplication.security.locks.tool.LockPremission;
|
||||||
|
import com.lc.myapplication.security.locks.value.MeValues;
|
||||||
|
|
||||||
|
public class SettingDialog extends DialogFragment {
|
||||||
|
private Context mcon;
|
||||||
|
private SettingDialogBinding settingDialogBinding;
|
||||||
|
public SettingDialog(Context context){
|
||||||
|
mcon = context;
|
||||||
|
}
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
settingDialogBinding = SettingDialogBinding.inflate(inflater,null,false);
|
||||||
|
initdialog();
|
||||||
|
return settingDialogBinding.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initdialog() {
|
||||||
|
Window window = getDialog().getWindow();
|
||||||
|
window.setBackgroundDrawableResource(R.drawable.setting_dg);
|
||||||
|
window.getDecorView().setPadding(32, 20, 32, 60);
|
||||||
|
WindowManager.LayoutParams wl = window.getAttributes();
|
||||||
|
wl.gravity = Gravity.BOTTOM;
|
||||||
|
wl.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||||
|
wl.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||||
|
window.setAttributes(wl);
|
||||||
|
setCancelable(true);
|
||||||
|
settingDialogBinding.setdialogFra.setVisibility(View.VISIBLE);
|
||||||
|
settingDialogBinding.setDialogChange.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(getActivity(), PassCodeActivity.class);
|
||||||
|
intent.putExtra(MeValues.KEYCODE_TYPE, 2);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
settingDialogBinding.setDialogPrivacy.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
String url = getString(R.string.url_privacy);
|
||||||
|
Intent intent2 = new Intent(Intent.ACTION_VIEW);
|
||||||
|
intent2.setData(Uri.parse(url));
|
||||||
|
startActivity(intent2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
package com.lc.myapplication.security.locks.draw;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.R;
|
||||||
|
import com.lc.myapplication.security.locks.adapter.BottomInputadapter;
|
||||||
|
import com.lc.myapplication.security.locks.adapter.TopInputadapter;
|
||||||
|
import com.lc.myapplication.security.locks.listener.BottomnumberClick;
|
||||||
|
import com.lc.myapplication.security.locks.listener.InputCodeFinishListener;
|
||||||
|
|
||||||
|
|
||||||
|
public class DrawInputView extends FrameLayout {
|
||||||
|
private RecyclerView passcode_top;
|
||||||
|
private RecyclerView passcode_bottom;
|
||||||
|
private Context mcon;
|
||||||
|
private StringBuilder my_code_top;
|
||||||
|
private TopInputadapter topInputadapter;
|
||||||
|
private BottomInputadapter bottomInputadapter;
|
||||||
|
private InputCodeFinishListener inputCodeFinishListener;
|
||||||
|
|
||||||
|
public DrawInputView(Context context) {
|
||||||
|
super(context);
|
||||||
|
initDrawView(context);
|
||||||
|
}
|
||||||
|
public void setInputFinish(InputCodeFinishListener codeFinish){
|
||||||
|
this.inputCodeFinishListener = codeFinish;
|
||||||
|
}
|
||||||
|
private void initDrawView(Context context) {
|
||||||
|
mcon = context;
|
||||||
|
my_code_top = new StringBuilder();
|
||||||
|
View view = LayoutInflater.from(context).inflate(R.layout.draw_input_view,null);
|
||||||
|
passcode_top = view.findViewById(R.id.draw_top);
|
||||||
|
passcode_bottom = view.findViewById(R.id.draw_bottom);
|
||||||
|
addView(view);
|
||||||
|
|
||||||
|
topInputadapter = new TopInputadapter();
|
||||||
|
passcode_top.setAdapter(topInputadapter);
|
||||||
|
passcode_top.setLayoutManager(new LinearLayoutManager(mcon,RecyclerView.HORIZONTAL,false));
|
||||||
|
|
||||||
|
bottomInputadapter = new BottomInputadapter();
|
||||||
|
passcode_bottom.setAdapter(bottomInputadapter);
|
||||||
|
passcode_bottom.setLayoutManager(new GridLayoutManager(mcon,3));
|
||||||
|
|
||||||
|
bottomInputadapter.setBottomClick(new BottomnumberClick() {
|
||||||
|
@Override
|
||||||
|
public void numberClick(String number) {
|
||||||
|
if (my_code_top.length() > 4){
|
||||||
|
my_code_top.delete(0,my_code_top.length());
|
||||||
|
}else {
|
||||||
|
my_code_top.append(number);
|
||||||
|
topInputadapter.upDatakey(my_code_top.toString());
|
||||||
|
if (my_code_top.length() == 4){
|
||||||
|
inputCodeFinishListener.CodeFinish(my_code_top.toString());
|
||||||
|
}else {
|
||||||
|
inputCodeFinishListener.CodeNotFinish(my_code_top.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete() {
|
||||||
|
if (my_code_top.length() >= 1){
|
||||||
|
my_code_top.deleteCharAt(my_code_top.length()-1);
|
||||||
|
}
|
||||||
|
topInputadapter.upDatakey(my_code_top.toString());
|
||||||
|
if (my_code_top.length() < 4){
|
||||||
|
inputCodeFinishListener.CodeNotFinish(my_code_top.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public DrawInputView(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
initDrawView(context);
|
||||||
|
}
|
||||||
|
public void ClearInputCode(){
|
||||||
|
my_code_top.delete(0,my_code_top.length());
|
||||||
|
topInputadapter.upDatakey(my_code_top.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
package com.lc.myapplication.security.locks.draw;
|
||||||
|
|
||||||
|
import android.graphics.Rect;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
public class MySpace extends RecyclerView.ItemDecoration {
|
||||||
|
private int ex_space = 0;
|
||||||
|
private int h_space = 0;
|
||||||
|
private int v_space = 0;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
|
||||||
|
int position = parent.getChildAdapterPosition(view);
|
||||||
|
int spanSize = 1;
|
||||||
|
int spanIndex = 0;
|
||||||
|
int spanCount = 1;
|
||||||
|
RecyclerView.LayoutManager layoutManager = parent.getLayoutManager();
|
||||||
|
if (layoutManager instanceof GridLayoutManager) {
|
||||||
|
GridLayoutManager layoutManager1 = (GridLayoutManager) layoutManager;
|
||||||
|
GridLayoutManager.LayoutParams layoutParams = (GridLayoutManager.LayoutParams) view.getLayoutParams();
|
||||||
|
spanCount = layoutManager1.getSpanCount();//设置每行排列的个数
|
||||||
|
spanSize = layoutManager1.getSpanSizeLookup().getSpanSize(position);//每个item的跨度大小
|
||||||
|
spanIndex = layoutParams.getSpanIndex();//放在给定位之前的每个项目,确定每个跨度
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (spanSize == spanCount) {
|
||||||
|
outRect.left = v_space + ex_space;
|
||||||
|
outRect.right = v_space + ex_space;
|
||||||
|
outRect.bottom = h_space;
|
||||||
|
} else {
|
||||||
|
int itemAllSpacing = (v_space * (spanCount + 1) + ex_space * 2) / spanCount;
|
||||||
|
int left = v_space * (spanIndex + 1) - itemAllSpacing * spanIndex + ex_space;
|
||||||
|
int right = itemAllSpacing - left;
|
||||||
|
outRect.left = left;
|
||||||
|
outRect.right = right;
|
||||||
|
outRect.bottom = h_space;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public MySpace(int ex_space, int h_space, int v_space) {
|
||||||
|
this.ex_space = ex_space;
|
||||||
|
this.h_space = h_space;
|
||||||
|
this.v_space = v_space;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
package com.lc.myapplication.security.locks.listener;
|
||||||
|
|
||||||
|
public interface AppLockListener {
|
||||||
|
void SendMessage(String msg);
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
package com.lc.myapplication.security.locks.listener;
|
||||||
|
|
||||||
|
public interface BottomnumberClick {
|
||||||
|
void numberClick(String number);
|
||||||
|
void delete();
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
package com.lc.myapplication.security.locks.listener;
|
||||||
|
|
||||||
|
public interface InputCodeFinishListener {
|
||||||
|
void CodeFinish(String code);
|
||||||
|
void CodeNotFinish(String code);
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
package com.lc.myapplication.security.locks.lockroom;
|
||||||
|
|
||||||
|
import androidx.room.Dao;
|
||||||
|
import androidx.room.Insert;
|
||||||
|
import androidx.room.OnConflictStrategy;
|
||||||
|
import androidx.room.Query;
|
||||||
|
import androidx.room.Update;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Dao
|
||||||
|
public interface SecurityLockDAO {
|
||||||
|
@Query("select * from lock_table where apppakname=:apppakname")
|
||||||
|
SecurityLockEntity QueryPackname(String apppakname);
|
||||||
|
|
||||||
|
@Query("select * from lock_table where apppakname LIKE :apppakname")
|
||||||
|
SecurityLockEntity QueryByInputName(String apppakname);
|
||||||
|
@Query("delete from lock_table where apppakname=:apppakname")
|
||||||
|
void DeleteEntityByName(String apppakname);
|
||||||
|
@Insert(onConflict = OnConflictStrategy.IGNORE)
|
||||||
|
void InsertSecurityEntity(SecurityLockEntity securityLockEntity);
|
||||||
|
@Query("select * from lock_table")
|
||||||
|
List<SecurityLockEntity> GetAllapp();
|
||||||
|
@Query("select * from lock_table where locksuccess=:locksuccess")
|
||||||
|
List<SecurityLockEntity> GetLockedApp(boolean locksuccess);
|
||||||
|
@Update
|
||||||
|
void Updataentity(SecurityLockEntity entity);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.lc.myapplication.security.locks.lockroom;
|
||||||
|
|
||||||
|
import androidx.room.Database;
|
||||||
|
import androidx.room.Entity;
|
||||||
|
import androidx.room.Room;
|
||||||
|
import androidx.room.RoomDatabase;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.value.MeValues;
|
||||||
|
|
||||||
|
@Database(entities = {SecurityLockEntity.class}, version = 1,exportSchema = false)
|
||||||
|
public abstract class SecurityLockDataBase extends RoomDatabase {
|
||||||
|
private static SecurityLockDataBase securityLockDataBase;
|
||||||
|
public abstract SecurityLockDAO getsecurityLockDAO();
|
||||||
|
public static synchronized SecurityLockDataBase getSecurityLockDataBase(){
|
||||||
|
if (securityLockDataBase == null){
|
||||||
|
securityLockDataBase = Room.databaseBuilder(MeValues.lock,SecurityLockDataBase.class,MeValues.DB_NAME).build();
|
||||||
|
|
||||||
|
}
|
||||||
|
return securityLockDataBase;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
package com.lc.myapplication.security.locks.lockroom;
|
||||||
|
|
||||||
|
import androidx.room.Entity;
|
||||||
|
import androidx.room.Index;
|
||||||
|
import androidx.room.PrimaryKey;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.value.MeValues;
|
||||||
|
|
||||||
|
@Entity(tableName = MeValues.TABLE_NAME,indices = {@Index(value = {"apppakname"},unique = true)})
|
||||||
|
public class SecurityLockEntity {
|
||||||
|
@PrimaryKey(autoGenerate = true)
|
||||||
|
private int appid;
|
||||||
|
private String apppakname;
|
||||||
|
private String applsign;
|
||||||
|
private String applogo;
|
||||||
|
private boolean locksuccess;
|
||||||
|
|
||||||
|
public int getAppid() {
|
||||||
|
return appid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppid(int appid) {
|
||||||
|
this.appid = appid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApppakname() {
|
||||||
|
return apppakname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApppakname(String apppakname) {
|
||||||
|
this.apppakname = apppakname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApplsign() {
|
||||||
|
return applsign;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplsign(String applsign) {
|
||||||
|
this.applsign = applsign;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApplogo() {
|
||||||
|
return applogo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplogo(String applogo) {
|
||||||
|
this.applogo = applogo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLocksuccess() {
|
||||||
|
return locksuccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocksuccess(boolean locksuccess) {
|
||||||
|
this.locksuccess = locksuccess;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
package com.lc.myapplication.security.locks.tool;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.Service;
|
||||||
|
import android.app.usage.UsageEvents;
|
||||||
|
import android.app.usage.UsageStatsManager;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.pm.ApplicationInfo;
|
||||||
|
import android.content.pm.PackageInfo;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.content.pm.ResolveInfo;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.UserManager;
|
||||||
|
import android.os.Vibrator;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.ArraySet;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockDataBase;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockEntity;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public class AppsManager {
|
||||||
|
|
||||||
|
public static Set<SecurityLockEntity> queryapps(Context context){
|
||||||
|
Set<SecurityLockEntity> entitieslist = new ArraySet<>();//set保证存储元素不重复
|
||||||
|
Intent intent = new Intent(Intent.ACTION_MAIN,null);
|
||||||
|
intent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||||
|
PackageManager packageManager = context.getPackageManager();
|
||||||
|
List<ResolveInfo> resolveInfoslist = packageManager.queryIntentActivities(intent,PackageManager.MATCH_ALL);
|
||||||
|
for (ResolveInfo info : resolveInfoslist){
|
||||||
|
String packname = info.activityInfo.packageName;
|
||||||
|
if (packname == context.getPackageName()){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SecurityLockEntity securityLockEntity = new SecurityLockEntity();
|
||||||
|
securityLockEntity.setApppakname(packname);
|
||||||
|
try {
|
||||||
|
ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packname,PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||||
|
CharSequence applicationLabel = packageManager.getApplicationLabel(applicationInfo);//获取应用程序的名称
|
||||||
|
securityLockEntity.setApplsign(applicationLabel.toString());
|
||||||
|
entitieslist.add(securityLockEntity);
|
||||||
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return entitieslist;
|
||||||
|
}
|
||||||
|
public static void insertEntity(Set<SecurityLockEntity> list) {
|
||||||
|
Log.d("--------size","----size"+list.size());
|
||||||
|
MyTools.RUNIO(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
for (SecurityLockEntity entityApp : list) {
|
||||||
|
SecurityLockDataBase.getSecurityLockDataBase().getsecurityLockDAO().InsertSecurityEntity(entityApp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public static void vir(Context context){
|
||||||
|
Vibrator vibrator = (Vibrator) context.getSystemService(Service.VIBRATOR_SERVICE);
|
||||||
|
vibrator.vibrate(300);
|
||||||
|
}
|
||||||
|
public static Drawable getapplogo(Context context,String packname){
|
||||||
|
PackageManager packageManager = context.getPackageManager();
|
||||||
|
Drawable appslogo;
|
||||||
|
try {
|
||||||
|
appslogo = packageManager.getApplicationIcon(packageManager.getApplicationInfo(packname,PackageManager.GET_UNINSTALLED_PACKAGES));
|
||||||
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return appslogo;
|
||||||
|
}
|
||||||
|
public static String appsusage(Context context){
|
||||||
|
UsageStatsManager usageStatsManager = (UsageStatsManager) context.getSystemService(Context.USAGE_STATS_SERVICE);
|
||||||
|
long lastTime = System.currentTimeMillis();
|
||||||
|
long startTime = lastTime - 10000;
|
||||||
|
String result = "";
|
||||||
|
UsageEvents.Event event = new UsageEvents.Event();
|
||||||
|
UsageEvents usageEvents = usageStatsManager.queryEvents(startTime, lastTime);
|
||||||
|
while (usageEvents.hasNextEvent()) {
|
||||||
|
usageEvents.getNextEvent(event);
|
||||||
|
if (event.getEventType() == UsageEvents.Event.MOVE_TO_FOREGROUND) {
|
||||||
|
result = event.getPackageName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(result)) {
|
||||||
|
return result;
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
package com.lc.myapplication.security.locks.tool;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.PixelFormat;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.R;
|
||||||
|
import com.lc.myapplication.security.locks.databinding.MyServiceViewBinding;
|
||||||
|
import com.lc.myapplication.security.locks.listener.InputCodeFinishListener;
|
||||||
|
|
||||||
|
public class LockAction {
|
||||||
|
private Context context;
|
||||||
|
|
||||||
|
private MyServiceViewBinding myServiceViewBinding;
|
||||||
|
private WindowManager manager;
|
||||||
|
|
||||||
|
private static LockAction myIntentSerivice;
|
||||||
|
private WindowManager.LayoutParams layParams;
|
||||||
|
|
||||||
|
public LockAction(Context context) {
|
||||||
|
this.context = context;
|
||||||
|
manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
|
||||||
|
myServiceViewBinding = MyServiceViewBinding.inflate(LayoutInflater.from(context), null, false);
|
||||||
|
setLocation();
|
||||||
|
myServiceViewBinding.passcodeDrawInput.setInputFinish(new InputCodeFinishListener() {
|
||||||
|
@Override
|
||||||
|
public void CodeFinish(String code) {
|
||||||
|
String curPin = MyTools.getPassword();
|
||||||
|
if (curPin.equals(code)) {
|
||||||
|
HideLockView();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(context, context.getString(R.string.not_key), Toast.LENGTH_SHORT).show();
|
||||||
|
AppsManager.vir(context);
|
||||||
|
myServiceViewBinding.passcodeDrawInput.ClearInputCode();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void CodeNotFinish(String code) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setLocation() {
|
||||||
|
int type = 0;
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
||||||
|
} else {
|
||||||
|
type = WindowManager.LayoutParams.TYPE_PHONE;
|
||||||
|
}
|
||||||
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||||
|
manager.getDefaultDisplay().getMetrics(displayMetrics);
|
||||||
|
int flag = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
|
||||||
|
WindowManager.LayoutParams.FLAG_FULLSCREEN |
|
||||||
|
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
|
||||||
|
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS |
|
||||||
|
WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
||||||
|
layParams = new WindowManager.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, type, flag, PixelFormat.RGBA_8888);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LockAction getActionInstance(Context context) {
|
||||||
|
if (myIntentSerivice == null) {
|
||||||
|
myIntentSerivice = new LockAction(context);
|
||||||
|
}
|
||||||
|
return myIntentSerivice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showLockView() {
|
||||||
|
myServiceViewBinding.passcodeDrawInput.ClearInputCode();
|
||||||
|
if (myServiceViewBinding.getRoot().getWindowToken() == null) {
|
||||||
|
manager.addView(myServiceViewBinding.getRoot(), layParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void HideLockView() {
|
||||||
|
if (myServiceViewBinding.getRoot().getWindowToken() != null) {
|
||||||
|
manager.removeView(myServiceViewBinding.getRoot());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.lc.myapplication.security.locks.tool;
|
||||||
|
|
||||||
|
import android.app.AppOpsManager;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.provider.Settings;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.value.MeValues;
|
||||||
|
|
||||||
|
public class LockPremission {
|
||||||
|
private static AppOpsManager appOpsManager = (AppOpsManager) MeValues.lock.getSystemService(Context.APP_OPS_SERVICE);
|
||||||
|
public static void Privacypremit(Context context){
|
||||||
|
Intent intent = new Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
public static void ShowOnpremit(Context context){
|
||||||
|
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
public static boolean privacysuccess(Context context){
|
||||||
|
int mode = appOpsManager.checkOpNoThrow("android:get_usage_stats", android.os.Process.myUid(), context.getPackageName());//检查是否有某项权限
|
||||||
|
if(mode == AppOpsManager.MODE_ALLOWED){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public static boolean showonsuccess(Context context){
|
||||||
|
if (Settings.canDrawOverlays(context)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public static boolean allpermiss(Context context){
|
||||||
|
boolean privacy = LockPremission.privacysuccess(context);
|
||||||
|
boolean showon = LockPremission.showonsuccess(context);
|
||||||
|
return privacy && showon;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
package com.lc.myapplication.security.locks.tool;
|
||||||
|
|
||||||
|
import android.app.IntentService;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockDataBase;
|
||||||
|
import com.lc.myapplication.security.locks.lockroom.SecurityLockEntity;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class MyService extends IntentService {
|
||||||
|
private String lastLockPackName = "";
|
||||||
|
private LockAction lockAction;
|
||||||
|
private Boolean isLock = true;
|
||||||
|
|
||||||
|
public MyService() {
|
||||||
|
super("name");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onHandleIntent(@Nullable Intent intent) {
|
||||||
|
lockAction = LockAction.getActionInstance(this);
|
||||||
|
while (isLock) {
|
||||||
|
String packageName = AppsManager.appsusage(this);
|
||||||
|
if (Objects.equals(packageName, "")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SecurityLockEntity securityLockEntity = SecurityLockDataBase.getSecurityLockDataBase().getsecurityLockDAO().QueryPackname(packageName);
|
||||||
|
if (securityLockEntity == null) {
|
||||||
|
lockAction.HideLockView();
|
||||||
|
lastLockPackName = packageName;
|
||||||
|
//Log.e("--------","---securityLockEntity"+null);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (Objects.equals(packageName, lastLockPackName)) {
|
||||||
|
//Log.e("--------","---22222222222");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (securityLockEntity.isLocksuccess()) {
|
||||||
|
// Log.e("--------","---11111111111");
|
||||||
|
if (!Objects.equals(packageName, lastLockPackName)) {
|
||||||
|
MyTools.onRunMain(() -> {
|
||||||
|
lockAction.showLockView();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/// Log.e("--------","---3333333333333");
|
||||||
|
MyTools.onRunMain(() -> {
|
||||||
|
lockAction.HideLockView();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
lastLockPackName = packageName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
package com.lc.myapplication.security.locks.tool;
|
||||||
|
|
||||||
|
import android.app.Service;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.value.MeValues;
|
||||||
|
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
|
public class MyTools {
|
||||||
|
private static SharedPreferences sharedPreferences;
|
||||||
|
private static SharedPreferences.Editor editor;
|
||||||
|
private static ExecutorService executorService;
|
||||||
|
private static Handler myHandler;
|
||||||
|
|
||||||
|
public static void init(Context context){
|
||||||
|
if (sharedPreferences == null){
|
||||||
|
sharedPreferences = context.getSharedPreferences(MeValues.SHARE_NAME, Service.MODE_PRIVATE);
|
||||||
|
}
|
||||||
|
if(editor == null){
|
||||||
|
editor = sharedPreferences.edit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void setPassword(String pin){
|
||||||
|
editor.putString(MeValues.sh_password,pin);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void settest(String key,boolean value){
|
||||||
|
editor.putBoolean(key,value);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
public static boolean getTest(String key){
|
||||||
|
return sharedPreferences.getBoolean(key,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getPassword(){
|
||||||
|
return sharedPreferences.getString(MeValues.sh_password,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ExecutorService getExecutorService(){
|
||||||
|
if (executorService == null){
|
||||||
|
executorService = Executors.newSingleThreadExecutor();
|
||||||
|
}
|
||||||
|
return executorService;
|
||||||
|
}
|
||||||
|
public static void RUNIO(Runnable runnable){
|
||||||
|
getExecutorService().execute(runnable);
|
||||||
|
}
|
||||||
|
private static android.os.Handler getMyHandler() {
|
||||||
|
if (myHandler == null) {
|
||||||
|
myHandler = new Handler(Looper.getMainLooper());
|
||||||
|
}
|
||||||
|
return myHandler;
|
||||||
|
}
|
||||||
|
public static void onRunMain(Runnable runnable){
|
||||||
|
getMyHandler().post(runnable);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.lc.myapplication.security.locks.value;
|
||||||
|
|
||||||
|
import com.lc.myapplication.security.locks.Securitylocks;
|
||||||
|
|
||||||
|
public class MeValues {
|
||||||
|
public static Securitylocks lock;
|
||||||
|
public static final String TABLE_NAME = "lock_table";
|
||||||
|
public static final String SHARE_NAME = "share_name";
|
||||||
|
public static final String DB_NAME = "db_name";
|
||||||
|
|
||||||
|
public static String KEYCODE_TYPE = "password_type";
|
||||||
|
public static String sh_password = "share_password";
|
||||||
|
public static final String FIRST_KEY = "first key";
|
||||||
|
}
|
||||||
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
||||||
30
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="85.84757"
|
||||||
|
android:endY="92.4963"
|
||||||
|
android:startX="42.9492"
|
||||||
|
android:startY="49.59793"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000" />
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/image_back_bg.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="40dp"
|
||||||
|
android:height="40dp"
|
||||||
|
android:viewportWidth="40"
|
||||||
|
android:viewportHeight="40"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M20 0C31.0457 0 40 8.95431 40 20C40 31.0457 31.0457 40 20 40C8.95431 40 0 31.0457 0 20C0 8.95431 8.95431 0 20 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V40H40V0"
|
||||||
|
android:fillColor="#CCFFFFFF"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
13
app/src/main/res/drawable/image_back_src.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M15,4L7,12L15,20"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
</vector>
|
||||||
45
app/src/main/res/drawable/input_bg.xml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="71dp"
|
||||||
|
android:height="71dp"
|
||||||
|
android:viewportWidth="71"
|
||||||
|
android:viewportHeight="71"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M35.5 0.5C54.83 0.5 70.5 16.17 70.5 35.5C70.5 54.83 54.83 70.5 35.5 70.5C16.17 70.5 0.5 54.83 0.5 35.5C0.5 16.17 16.17 0.5 35.5 0.5Z"
|
||||||
|
/>
|
||||||
|
<group
|
||||||
|
android:translateX="1"
|
||||||
|
android:translateY="-0.007"
|
||||||
|
android:pivotX="35.5"
|
||||||
|
android:pivotY="35.5"
|
||||||
|
android:scaleX="1.943"
|
||||||
|
android:scaleY="1.943"
|
||||||
|
android:rotation="90"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
android:pathData="M0.5 0.5V70.5H70.5V0.5"
|
||||||
|
>
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:type="radial"
|
||||||
|
android:centerX="35.5"
|
||||||
|
android:centerY="35.5"
|
||||||
|
android:gradientRadius="17.5"
|
||||||
|
>
|
||||||
|
<item
|
||||||
|
android:color="#C2FDFF"
|
||||||
|
android:offset="0"
|
||||||
|
/>
|
||||||
|
<item
|
||||||
|
android:color="#99FFFFFF"
|
||||||
|
android:offset="1"
|
||||||
|
/>
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
10
app/src/main/res/drawable/input_delete_src.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M5.685,17.938C6.007,18.316 6.407,18.619 6.858,18.827C7.308,19.035 7.799,19.143 8.295,19.143H18.893C19.802,19.143 20.674,18.782 21.317,18.139C21.961,17.496 22.322,16.624 22.322,15.714V8.288C22.322,7.379 21.961,6.507 21.317,5.864C20.674,5.221 19.802,4.859 18.893,4.859H8.295C7.799,4.859 7.308,4.967 6.858,5.175C6.407,5.383 6.007,5.687 5.685,6.065L2.522,9.778C1.993,10.398 1.703,11.186 1.703,12.001C1.703,12.816 1.993,13.604 2.522,14.224L5.685,17.938ZM9.396,8.135C9.495,8.036 9.614,7.957 9.744,7.903C9.874,7.849 10.013,7.821 10.154,7.821C10.294,7.821 10.434,7.849 10.564,7.903C10.694,7.957 10.812,8.036 10.911,8.135L13.226,10.45L15.538,8.135C15.638,8.036 15.756,7.957 15.886,7.903C16.016,7.849 16.155,7.822 16.296,7.822C16.437,7.822 16.576,7.849 16.706,7.903C16.836,7.957 16.954,8.036 17.054,8.135C17.153,8.235 17.232,8.353 17.286,8.483C17.34,8.613 17.368,8.752 17.368,8.893C17.368,9.034 17.34,9.173 17.286,9.303C17.232,9.433 17.153,9.551 17.054,9.651L14.739,11.965L17.054,14.279C17.153,14.379 17.232,14.497 17.286,14.627C17.34,14.757 17.368,14.896 17.368,15.037C17.368,15.178 17.34,15.317 17.286,15.447C17.232,15.577 17.153,15.695 17.054,15.795C16.954,15.894 16.836,15.973 16.706,16.027C16.576,16.081 16.437,16.109 16.296,16.109C16.155,16.109 16.016,16.081 15.886,16.027C15.756,15.973 15.638,15.894 15.538,15.795L13.224,13.481L10.91,15.795C10.707,15.986 10.437,16.09 10.159,16.086C9.88,16.082 9.614,15.969 9.417,15.772C9.22,15.575 9.108,15.309 9.104,15.03C9.1,14.751 9.205,14.482 9.396,14.279L11.71,11.965L9.396,9.651C9.296,9.551 9.218,9.433 9.164,9.303C9.11,9.173 9.082,9.034 9.082,8.893C9.082,8.752 9.11,8.613 9.164,8.483C9.218,8.353 9.296,8.235 9.396,8.135Z"
|
||||||
|
android:fillColor="#293036"
|
||||||
|
android:fillType="evenOdd"/>
|
||||||
|
</vector>
|
||||||
12
app/src/main/res/drawable/lock.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="64dp"
|
||||||
|
android:height="64dp"
|
||||||
|
android:viewportWidth="1024"
|
||||||
|
android:viewportHeight="1024">
|
||||||
|
<path
|
||||||
|
android:pathData="M768,416h-32v-96c0,-59.6 -23.4,-115.8 -65.8,-158.2S571.6,96 512,96s-115.8,23.4 -158.2,65.8S288,260.4 288,320v96h-32c-70.4,0 -128,57.6 -128,128v256c0,70.4 57.6,128 128,128h512c70.4,0 128,-57.6 128,-128L896,544c0,-70.4 -57.6,-128 -128,-128zM352,320c0,-42.5 16.7,-82.6 47,-113s70.4,-47 113,-47 82.6,16.7 113,47 47,70.4 47,113v96L352,416v-96zM832,800c0,17 -6.7,33 -18.9,45.1S785,864 768,864L256,864c-17,0 -33,-6.7 -45.1,-18.9S192,817 192,800L192,544c0,-17 6.7,-33 18.9,-45.1S239,480 256,480h512c17,0 33,6.7 45.1,18.9S832,527 832,544v256z"
|
||||||
|
android:fillColor="#67b19c"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M512,576c-26.5,0 -48,21.5 -48,48 0,14.2 6.2,27 16,35.8V736c0,17.6 14.4,32 32,32s32,-14.4 32,-32v-76.2c9.8,-8.8 16,-21.6 16,-35.8 0,-26.5 -21.5,-48 -48,-48z"
|
||||||
|
android:fillColor="#67b19c"/>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/locked_recycle_bg.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="101dp"
|
||||||
|
android:height="136dp"
|
||||||
|
android:viewportWidth="101"
|
||||||
|
android:viewportHeight="136"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M16 0H85C93.8366 0 101 7.16344 101 16V120C101 128.837 93.8366 136 85 136H16C7.16344 136 0 128.837 0 120V16C0 7.16344 7.16344 0 16 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V136H101V0"
|
||||||
|
android:fillColor="#3382D6E1"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/main_dialog_button_bg.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="295dp"
|
||||||
|
android:height="44dp"
|
||||||
|
android:viewportWidth="295"
|
||||||
|
android:viewportHeight="44"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M22 0H273C285.15 0 295 9.84974 295 22C295 34.1503 285.15 44 273 44H22C9.84974 44 0 34.1503 0 22C0 9.84974 9.84974 0 22 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V44H295V0"
|
||||||
|
android:fillColor="#D2D5DA"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/main_dialog_button_bg2.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="295dp"
|
||||||
|
android:height="44dp"
|
||||||
|
android:viewportWidth="295"
|
||||||
|
android:viewportHeight="44"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M22 0H273C285.15 0 295 9.84974 295 22C295 34.1503 285.15 44 273 44H22C9.84974 44 0 34.1503 0 22C0 9.84974 9.84974 0 22 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V44H295V0"
|
||||||
|
android:fillColor="#00C0C8"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/main_re1.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="327dp"
|
||||||
|
android:height="104dp"
|
||||||
|
android:viewportWidth="327"
|
||||||
|
android:viewportHeight="104"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M24 0H303C316.255 0 327 10.7452 327 24V80C327 93.2548 316.255 104 303 104H24C10.7452 104 0 93.2548 0 80V24C0 10.7452 10.7452 0 24 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V104H327V0"
|
||||||
|
android:fillColor="#3382D6E1"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
38
app/src/main/res/drawable/main_re_allapp_src.xml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M20.177,14.231V4.916C20.177,3.905 19.358,3.086 18.348,3.086H5.652C4.642,3.086 3.823,3.905 3.823,4.916V19.071C3.823,20.081 4.642,20.9 5.652,20.9H15.428"
|
||||||
|
android:strokeWidth="1.815"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M7.844,7.679m-1.281,0a1.281,1.281 0,1 1,2.562 0a1.281,1.281 0,1 1,-2.562 0"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M11.869,7.679m-1.281,0a1.281,1.281 0,1 1,2.562 0a1.281,1.281 0,1 1,-2.562 0"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M15.894,7.679m-1.281,0a1.281,1.281 0,1 1,2.562 0a1.281,1.281 0,1 1,-2.562 0"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M7.844,11.705m-1.281,0a1.281,1.281 0,1 1,2.562 0a1.281,1.281 0,1 1,-2.562 0"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M11.869,11.705m-1.281,0a1.281,1.281 0,1 1,2.562 0a1.281,1.281 0,1 1,-2.562 0"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M15.894,11.705m-1.281,0a1.281,1.281 0,1 1,2.562 0a1.281,1.281 0,1 1,-2.562 0"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M7.844,15.73m-1.281,0a1.281,1.281 0,1 1,2.562 0a1.281,1.281 0,1 1,-2.562 0"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M11.869,15.73m-1.281,0a1.281,1.281 0,1 1,2.562 0a1.281,1.281 0,1 1,-2.562 0"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M15.894,15.73m-1.281,0a1.281,1.281 0,1 1,2.562 0a1.281,1.281 0,1 1,-2.562 0"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/main_re_ig1.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="56dp"
|
||||||
|
android:height="56dp"
|
||||||
|
android:viewportWidth="56"
|
||||||
|
android:viewportHeight="56"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M28 0C43.464 0 56 12.536 56 28C56 43.464 43.464 56 28 56C12.536 56 0 43.464 0 28C0 12.536 12.536 0 28 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V56H56V0"
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
19
app/src/main/res/drawable/main_re_src.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="20dp"
|
||||||
|
android:height="20dp"
|
||||||
|
android:viewportWidth="20"
|
||||||
|
android:viewportHeight="20">
|
||||||
|
<path
|
||||||
|
android:pathData="M5.295,8.216V5.762C5.295,3.163 7.401,1.057 10,1.057V1.057C12.599,1.057 14.705,3.163 14.705,5.762V8.216"
|
||||||
|
android:strokeWidth="1.81492"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M18.112,15.896V10.105C18.112,9.095 17.293,8.275 16.282,8.275H3.718C2.707,8.275 1.888,9.095 1.888,10.105V16.549C1.888,17.559 2.707,18.378 3.718,18.378H14.59"
|
||||||
|
android:strokeWidth="1.81492"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M8.353,13.324a1.647,1.647 0,1 0,3.293 0a1.647,1.647 0,1 0,-3.293 0z"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
</vector>
|
||||||
19
app/src/main/res/drawable/main_re_tuijian_src.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="25dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="25">
|
||||||
|
<path
|
||||||
|
android:pathData="M12,12.713m-4.48,0a4.48,4.48 0,1 1,8.959 0a4.48,4.48 0,1 1,-8.959 0"
|
||||||
|
android:strokeWidth="1.81"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M20.918,10.3C21.476,12.363 21.302,14.556 20.425,16.505C19.548,18.454 18.022,20.039 16.107,20.989C14.193,21.94 12.008,22.196 9.925,21.716C7.842,21.236 5.99,20.049 4.685,18.356C3.379,16.664 2.701,14.571 2.765,12.435C2.83,10.298 3.633,8.25 5.038,6.64C6.444,5.029 8.364,3.955 10.472,3.602C12.58,3.248 14.745,3.637 16.599,4.701"
|
||||||
|
android:strokeWidth="1.81"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M10.5,12.713a1.5,1.5 0,1 0,3 0a1.5,1.5 0,1 0,-3 0z"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
</vector>
|
||||||
19
app/src/main/res/drawable/main_set_bg.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<!-- drawable/frame_10000.xml -->
|
||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="56dp"
|
||||||
|
android:height="56dp"
|
||||||
|
android:viewportWidth="56"
|
||||||
|
android:viewportHeight="56"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M28 0C43.464 0 56 12.536 56 28C56 43.464 43.464 56 28 56C12.536 56 0 43.464 0 28C0 12.536 12.536 0 28 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V56H56V0"
|
||||||
|
android:fillColor="#CCFFFFFF"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/mian_re2_bg.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="155.5dp"
|
||||||
|
android:height="155dp"
|
||||||
|
android:viewportWidth="155.5"
|
||||||
|
android:viewportHeight="155"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M24 0H131.5C144.755 0 155.5 10.7452 155.5 24V131C155.5 144.255 144.755 155 131.5 155H24C10.7452 155 0 144.255 0 131V24C0 10.7452 10.7452 0 24 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V155H155.5V0"
|
||||||
|
android:fillColor="#3382D6E1"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/ok_bg.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="150dp"
|
||||||
|
android:height="20dp"
|
||||||
|
android:viewportWidth="295"
|
||||||
|
android:viewportHeight="44"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M22 0H273C285.15 0 295 9.84974 295 22C295 34.1503 285.15 44 273 44H22C9.84974 44 0 34.1503 0 22C0 9.84974 9.84974 0 22 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V44H295V0"
|
||||||
|
android:fillColor="#00C0C8"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
6
app/src/main/res/drawable/selector_app_lock.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@drawable/lock"/>
|
||||||
|
<item android:drawable="@drawable/unlock"/>
|
||||||
|
|
||||||
|
</selector>
|
||||||
6
app/src/main/res/drawable/selector_dialog_buttonbg.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@drawable/main_dialog_button_bg"/>
|
||||||
|
<item android:state_selected="false" android:drawable="@drawable/main_dialog_button_bg2"/>
|
||||||
|
|
||||||
|
</selector>
|
||||||
18
app/src/main/res/drawable/set_bg.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="32dp"
|
||||||
|
android:height="32dp"
|
||||||
|
android:viewportWidth="32"
|
||||||
|
android:viewportHeight="32"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V32H32V0"
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
30
app/src/main/res/drawable/set_src.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="20dp"
|
||||||
|
android:height="21dp"
|
||||||
|
android:viewportWidth="20"
|
||||||
|
android:viewportHeight="21">
|
||||||
|
<path
|
||||||
|
android:pathData="M1,3.5H5M19,3.5H9M1,10.5H13M19,10.5H17M1,17.5H3M19,17.5H7"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M7,5.5C8.105,5.5 9,4.605 9,3.5C9,2.395 8.105,1.5 7,1.5C5.895,1.5 5,2.395 5,3.5C5,4.605 5.895,5.5 7,5.5Z"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M15,12.5C16.105,12.5 17,11.605 17,10.5C17,9.395 16.105,8.5 15,8.5C13.895,8.5 13,9.395 13,10.5C13,11.605 13.895,12.5 15,12.5Z"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M5,19.5C6.105,19.5 7,18.605 7,17.5C7,16.395 6.105,15.5 5,15.5C3.895,15.5 3,16.395 3,17.5C3,18.605 3.895,19.5 5,19.5Z"
|
||||||
|
android:strokeWidth="2"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
</vector>
|
||||||
21
app/src/main/res/drawable/set_src1.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="17dp"
|
||||||
|
android:height="18dp"
|
||||||
|
android:viewportWidth="17"
|
||||||
|
android:viewportHeight="18">
|
||||||
|
<path
|
||||||
|
android:pathData="M4.567,7.671V5.489C4.567,3.179 6.44,1.307 8.75,1.307V1.307C11.06,1.307 12.932,3.179 12.932,5.489V7.671"
|
||||||
|
android:strokeWidth="1.6"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M15.96,14.497V9.349C15.96,8.451 15.232,7.723 14.334,7.723H3.166C2.268,7.723 1.54,8.451 1.54,9.349V15.077C1.54,15.975 2.268,16.703 3.166,16.703H12.83"
|
||||||
|
android:strokeWidth="1.6"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M7.286,12.212a1.464,1.464 0,1 0,2.928 0a1.464,1.464 0,1 0,-2.928 0z"
|
||||||
|
android:fillColor="#1F252E"/>
|
||||||
|
</vector>
|
||||||
26
app/src/main/res/drawable/set_src2.xml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="17dp"
|
||||||
|
android:height="16dp"
|
||||||
|
android:viewportWidth="17"
|
||||||
|
android:viewportHeight="16">
|
||||||
|
<path
|
||||||
|
android:pathData="M13.781,15.113C12.471,15.113 12.2,14.052 12.2,12.743V2.471C12.2,2.052 12.034,1.65 11.738,1.353C11.441,1.057 11.039,0.891 10.62,0.891H2.719C2.3,0.891 1.898,1.057 1.602,1.353C1.305,1.65 1.139,2.052 1.139,2.471V11.952C1.139,12.791 1.472,13.594 2.064,14.187C2.657,14.78 3.461,15.113 4.299,15.113"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="1.6"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M15.361,6.422C15.361,6.003 15.194,5.601 14.898,5.305C14.601,5.008 14.2,4.842 13.78,4.842H12.2V13.138C12.2,14.229 12.69,15.113 13.78,15.113C14.871,15.113 15.361,14.229 15.361,13.138V6.422Z"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="1.6"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M9.04,7.211H4.299M9.04,4.051H4.299M6.67,10.372H4.299"
|
||||||
|
android:strokeWidth="1.6"
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:strokeColor="#1F252E"
|
||||||
|
android:strokeLineCap="round"/>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/setting_dg.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="375dp"
|
||||||
|
android:height="239dp"
|
||||||
|
android:viewportWidth="375"
|
||||||
|
android:viewportHeight="239"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M0 0H375V239H0V0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V239H375V0"
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/thumb_pass.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="16dp"
|
||||||
|
android:height="16dp"
|
||||||
|
android:viewportWidth="16"
|
||||||
|
android:viewportHeight="16"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V16H16V0"
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
6
app/src/main/res/drawable/thumb_selector.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:drawable="@drawable/thumb_pass" android:state_pressed="true"/>
|
||||||
|
<item android:drawable="@drawable/thumb_pass" android:state_pressed="false"/>
|
||||||
|
</selector>
|
||||||
6
app/src/main/res/drawable/top_code_selector.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:drawable="@drawable/top_current" android:state_selected="true"/>
|
||||||
|
<item android:drawable="@drawable/top_last" android:state_selected="false"/>
|
||||||
|
</selector>
|
||||||
9
app/src/main/res/drawable/top_current.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="19dp"
|
||||||
|
android:height="19dp"
|
||||||
|
android:viewportWidth="19"
|
||||||
|
android:viewportHeight="19">
|
||||||
|
<path
|
||||||
|
android:pathData="M6.739,6.739C8.267,5.223 10.733,5.223 12.261,6.739C13.777,8.267 13.777,10.733 12.261,12.261C10.733,13.777 8.267,13.777 6.739,12.261C5.223,10.733 5.223,8.267 6.739,6.739Z"
|
||||||
|
android:fillColor="#DDDDDD"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/top_last.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="19dp"
|
||||||
|
android:height="19dp"
|
||||||
|
android:viewportWidth="19"
|
||||||
|
android:viewportHeight="19">
|
||||||
|
<path
|
||||||
|
android:pathData="M6.49,6.49C7.879,5.111 10.121,5.111 11.51,6.49C12.889,7.879 12.889,10.121 11.51,11.51C10.121,12.889 7.879,12.889 6.49,11.51C5.111,10.121 5.111,7.879 6.49,6.49Z"
|
||||||
|
android:fillColor="#363E41"/>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/track_current.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="36dp"
|
||||||
|
android:height="20dp"
|
||||||
|
android:viewportWidth="36"
|
||||||
|
android:viewportHeight="20"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M10 0H26C31.5228 0 36 4.47715 36 10C36 15.5228 31.5228 20 26 20H10C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V20H36V0"
|
||||||
|
android:fillColor="#D2D5DA"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
18
app/src/main/res/drawable/track_pass.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<vector
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="36dp"
|
||||||
|
android:height="20dp"
|
||||||
|
android:viewportWidth="36"
|
||||||
|
android:viewportHeight="20"
|
||||||
|
>
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M10 0H26C31.5228 0 36 4.47715 36 10C36 15.5228 31.5228 20 26 20H10C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0Z"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0 0V20H36V0"
|
||||||
|
android:fillColor="#00C0C8"
|
||||||
|
/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
5
app/src/main/res/drawable/track_selector.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_checked="false" android:drawable="@drawable/track_current"/>
|
||||||
|
<item android:state_checked="true" android:drawable="@drawable/track_pass"/>
|
||||||
|
</selector>
|
||||||
12
app/src/main/res/drawable/unlock.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="64dp"
|
||||||
|
android:height="64dp"
|
||||||
|
android:viewportWidth="1024"
|
||||||
|
android:viewportHeight="1024">
|
||||||
|
<path
|
||||||
|
android:pathData="M768,416L352,416v-96c0,-42.5 16.7,-82.6 47,-113s70.4,-47 113,-47c37.9,0 74.7,13.6 103.6,38.4 28.7,24.5 47.9,58.2 54.1,95 3,17.4 19.5,29.2 36.9,26.2s29.2,-19.5 26.2,-36.9c-8.7,-51.5 -35.6,-98.7 -75.7,-132.9C616.7,115.1 565.1,96 512,96c-59.6,0 -115.8,23.4 -158.2,65.8S288,260.4 288,320v96h-32c-70.4,0 -128,57.6 -128,128v256c0,70.4 57.6,128 128,128h512c70.4,0 128,-57.6 128,-128L896,544c0,-70.4 -57.6,-128 -128,-128zM832,800c0,17 -6.7,33 -18.9,45.1S785,864 768,864L256,864c-17,0 -33,-6.7 -45.1,-18.9S192,817 192,800L192,544c0,-17 6.7,-33 18.9,-45.1S239,480 256,480h512c17,0 33,6.7 45.1,18.9S832,527 832,544v256z"
|
||||||
|
android:fillColor="#DCDCDC"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M512,576c-26.5,0 -48,21.5 -48,48 0,14.2 6.2,27 16,35.8V736c0,17.6 14.4,32 32,32s32,-14.4 32,-32v-76.2c9.8,-8.8 16,-21.6 16,-35.8 0,-26.5 -21.5,-48 -48,-48z"
|
||||||
|
android:fillColor="#DCDCDC"/>
|
||||||
|
</vector>
|
||||||
40
app/src/main/res/layout/activity_all_app.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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/all_main"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@mipmap/main_bg2"
|
||||||
|
android:paddingBottom="60dp"
|
||||||
|
tools:context=".activity.AllAppActivity">
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:paddingStart="24dp"
|
||||||
|
android:paddingEnd="24dp"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/all_apps_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:background="@drawable/image_back_bg"
|
||||||
|
android:src="@drawable/image_back_src"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/locked_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:text="@string/all_app"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="24sp"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/all_apps_view"
|
||||||
|
android:padding="24dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</LinearLayout>
|
||||||
13
app/src/main/res/layout/activity_into.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?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/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".activity.IntoActivity">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@mipmap/into"/>
|
||||||
|
</RelativeLayout>
|
||||||
40
app/src/main/res/layout/activity_locked_app.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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/locked_main"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@mipmap/main_bg2"
|
||||||
|
android:paddingBottom="60dp"
|
||||||
|
tools:context=".activity.LockedAppActivity">
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:paddingStart="24dp"
|
||||||
|
android:paddingEnd="24dp"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/locked_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:background="@drawable/image_back_bg"
|
||||||
|
android:src="@drawable/image_back_src"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/locked_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:text="@string/app_lock"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="24sp"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/locked_apps_view"
|
||||||
|
android:padding="24dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</LinearLayout>
|
||||||
138
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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/main_lin"
|
||||||
|
android:background="@mipmap/main_bg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".activity.MainActivity">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="287dp"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:background="@mipmap/main_fra_bg">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/main_set"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="26dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:background="@drawable/main_set_bg"
|
||||||
|
android:padding="20dp"
|
||||||
|
android:src="@drawable/set_src" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/main_text1"
|
||||||
|
android:layout_width="137dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/main_set"
|
||||||
|
android:layout_marginStart="26dp"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:text="@string/hello"
|
||||||
|
android:textSize="29sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/main_text1"
|
||||||
|
android:layout_marginStart="26dp"
|
||||||
|
android:text="@string/text"
|
||||||
|
android:textSize="17sp" />
|
||||||
|
</RelativeLayout>
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/main_re_lay1"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/main_re1"
|
||||||
|
android:padding="24dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:background="@drawable/main_re1"
|
||||||
|
android:layout_width="327dp"
|
||||||
|
android:layout_height="104dp">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/main_re_text1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/main_applock"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="24sp"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_below="@+id/main_re_text1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/main_alllock"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/main_re_image1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:background="@drawable/main_re_ig1"
|
||||||
|
android:src="@drawable/main_re_src"
|
||||||
|
android:padding="10dp"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/main_re2_lay1"
|
||||||
|
android:layout_below="@+id/main_re1"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:paddingStart="10dp"
|
||||||
|
android:paddingEnd="10dp"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<RelativeLayout
|
||||||
|
android:padding="20dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/mian_re2_bg">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/main_re2_image1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/main_re_ig1"
|
||||||
|
android:src="@drawable/main_re_tuijian_src"
|
||||||
|
android:padding="10dp"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_below="@+id/main_re2_image1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@string/tuijian"
|
||||||
|
android:textSize="19sp"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<RelativeLayout
|
||||||
|
android:padding="20dp"
|
||||||
|
android:id="@+id/main_re2_lay2"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/mian_re2_bg">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/main_re2_image2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/main_re_ig1"
|
||||||
|
android:src="@drawable/main_re_allapp_src"
|
||||||
|
android:padding="10dp"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_below="@+id/main_re2_image2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:text="@string/all_app"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="19sp"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
46
app/src/main/res/layout/activity_passcode_word.xml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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/passcode_main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@mipmap/main_bg2"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".activity.PassCodeActivity">
|
||||||
|
<ImageView
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:id="@+id/passcode_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:background="@drawable/image_back_bg"
|
||||||
|
android:src="@drawable/image_back_src"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/passcode_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@string/set_passcode"/>
|
||||||
|
<com.lc.myapplication.security.locks.draw.DrawInputView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:id="@+id/passcode_draw_input"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="24dp"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/passcode_step"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:background="@drawable/ok_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="24sp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
40
app/src/main/res/layout/activity_testimonials.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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/tuijian_main"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@mipmap/main_bg2"
|
||||||
|
android:paddingBottom="60dp"
|
||||||
|
tools:context=".activity.TestimonialsActivity">
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:paddingStart="24dp"
|
||||||
|
android:paddingEnd="24dp"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/tuijian_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:background="@drawable/image_back_bg"
|
||||||
|
android:src="@drawable/image_back_src"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tuijian_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:text="@string/tuijian"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="24sp"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/tuijian_apps_view"
|
||||||
|
android:padding="24dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</LinearLayout>
|
||||||
30
app/src/main/res/layout/all_apps_view.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="101dp"
|
||||||
|
android:layout_height="170dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:background="@drawable/locked_recycle_bg">
|
||||||
|
<ImageView
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:id="@+id/app_re_logo"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:id="@+id/app_re_name"
|
||||||
|
android:layout_marginTop="9dp"
|
||||||
|
android:layout_below="@+id/app_re_logo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<Switch
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:id="@+id/app_re_switch"
|
||||||
|
android:thumb="@drawable/thumb_selector"
|
||||||
|
android:track="@drawable/track_selector"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||||
|
</RelativeLayout>
|
||||||
23
app/src/main/res/layout/bottom_code_view.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/bottom_text"
|
||||||
|
android:layout_width="70dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:background="@drawable/input_bg"
|
||||||
|
android:text="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="24sp"
|
||||||
|
/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/bottom_image"
|
||||||
|
android:layout_width="70dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:background="@drawable/input_bg"
|
||||||
|
android:src="@drawable/input_delete_src"
|
||||||
|
android:padding="15sp"/>
|
||||||
|
</LinearLayout>
|
||||||
17
app/src/main/res/layout/draw_input_view.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/draw_top"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_below="@+id/draw_top"
|
||||||
|
android:id="@+id/draw_bottom"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</RelativeLayout>
|
||||||
30
app/src/main/res/layout/locked_apps_view.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="101dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:background="@drawable/locked_recycle_bg">
|
||||||
|
<ImageView
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:id="@+id/locked_re_logo"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:id="@+id/locked_re_name"
|
||||||
|
android:layout_marginTop="9dp"
|
||||||
|
android:layout_below="@+id/locked_re_logo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="60dp"/>
|
||||||
|
<Switch
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:id="@+id/locked_re_switch"
|
||||||
|
android:thumb="@drawable/thumb_selector"
|
||||||
|
android:track="@drawable/track_selector"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/locked_re_name"
|
||||||
|
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||||
|
</RelativeLayout>
|
||||||
37
app/src/main/res/layout/my_service_view.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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/passcode_main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@mipmap/main_bg2"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".activity.PassCodeActivity">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/passcode_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="80dp"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@string/enter_passcode"/>
|
||||||
|
<com.lc.myapplication.security.locks.draw.DrawInputView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:id="@+id/passcode_draw_input"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="24dp"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/passcode_step"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:text="@string/passcode_next"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
50
app/src/main/res/layout/permission_dialog.xml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/dialog_fra"
|
||||||
|
android:background="@color/white"
|
||||||
|
tools:context=".activity.MainActivity">
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/main_dialog_text"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:textSize="25sp"
|
||||||
|
android:text="@string/dialog_permiss"
|
||||||
|
android:layout_centerHorizontal="true"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/dialog_button1"
|
||||||
|
android:layout_width="295dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_below="@id/main_dialog_text"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:text="@string/dialog_step1"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="@drawable/selector_dialog_buttonbg"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/dialog_button2"
|
||||||
|
android:layout_width="295dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_below="@id/dialog_button1"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:text="@string/dialog_step2"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="@drawable/selector_dialog_buttonbg"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_below="@id/dialog_button2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@mipmap/dialog_bg" />
|
||||||
|
</RelativeLayout>
|
||||||
|
</FrameLayout>
|
||||||
69
app/src/main/res/layout/setting_dialog.xml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="375dp"
|
||||||
|
android:layout_height="239dp"
|
||||||
|
android:id="@+id/setdialog_fra"
|
||||||
|
tools:context=".activity.MainActivity">
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/main_dialog_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@string/setting_dialog"
|
||||||
|
android:layout_centerHorizontal="true"/>
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/set_dialog_change"
|
||||||
|
android:layout_width="147.5dp"
|
||||||
|
android:layout_marginTop="70dp"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingBottom="24dp"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/set_dialog1_image"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:background="@drawable/set_bg"
|
||||||
|
android:src="@drawable/set_src1"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_below="@+id/set_dialog1_image"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:text="@string/change_password"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/set_dialog_privacy"
|
||||||
|
android:layout_width="147.5dp"
|
||||||
|
android:paddingTop="24dp"
|
||||||
|
android:paddingBottom="24dp"
|
||||||
|
android:layout_marginTop="70dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/set_dialog2_image"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:background="@drawable/set_bg"
|
||||||
|
android:src="@drawable/set_src2"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_below="@+id/set_dialog2_image"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:text="@string/privacy"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
</FrameLayout>
|
||||||
16
app/src/main/res/layout/top_code_view.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<View
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:id="@+id/top_view"/>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:id="@+id/top_image_key"
|
||||||
|
android:src="@drawable/top_code_selector"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
30
app/src/main/res/layout/tuijian_apps_view.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="101dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:background="@drawable/locked_recycle_bg">
|
||||||
|
<ImageView
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:id="@+id/tuijian_re_logo"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:id="@+id/tuijian_re_name"
|
||||||
|
android:layout_marginTop="9dp"
|
||||||
|
android:layout_below="@+id/tuijian_re_logo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="60dp"/>
|
||||||
|
<Switch
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:id="@+id/tuijian_re_switch"
|
||||||
|
android:thumb="@drawable/thumb_selector"
|
||||||
|
android:track="@drawable/track_selector"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/tuijian_re_name"
|
||||||
|
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||||
|
</RelativeLayout>
|
||||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
||||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
||||||
BIN
app/src/main/res/mipmap-hdpi/dialog_bg.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-hdpi/into.png
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
app/src/main/res/mipmap-hdpi/logo.png
Normal file
|
After Width: | Height: | Size: 242 KiB |
BIN
app/src/main/res/mipmap-hdpi/main_bg.png
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
app/src/main/res/mipmap-hdpi/main_bg2.png
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
app/src/main/res/mipmap-hdpi/main_fra_bg.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |