更新 UI (未更新完)

This commit is contained in:
zhouzhijia 2024-08-19 15:34:36 +08:00
parent c9c62df82b
commit d8aff9eeba
17 changed files with 394 additions and 33 deletions

View File

@ -14,7 +14,7 @@ android {
compileSdk = 34
defaultConfig {
applicationId = "com.tool.lockapp"
applicationId = "com.tool.lockapp.test"
minSdk = 23
targetSdk = 34
versionCode = 2

View File

@ -9,7 +9,7 @@
"client_info": {
"mobilesdk_app_id": "1:302456749013:android:8bfd1909700112a18c1b5c",
"android_client_info": {
"package_name": "com.tool.lockapp"
"package_name": "com.tool.lockapp.test"
}
},
"oauth_client": [],

View File

@ -25,6 +25,9 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:targetApi="31">
<activity
android:name=".activity.WebActivity"
android:exported="false" />
<activity
android:name=".activity.SplashActivity"
android:exported="true">

View File

@ -0,0 +1,122 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Privacy Policy</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
padding: 20px;
}
h1, h2 {
color: #333;
}
h2 {
margin-top: 20px;
}
p {
margin: 10px 0;
}
ul {
margin: 10px 0;
padding-left: 20px;
}
</style>
</head>
<body>
<h1>Privacy Policy</h1>
<p><strong>Date:</strong> August 14, 2024</p>
<p>We provide this Privacy Policy to help you understand how we collect, use, and disclose
information, including what you may provide to us or that we obtain from our products and
services. We treat your privacy very seriously. Your privacy is important to us.</p>
<h2>Information Collection and Use</h2>
<p>For a better experience, while using our Service, we may require you to provide us with certain
personally identifiable information, such as users' name, address, location, pictures, etc. The
information that we request will be retained on your device and is not collected or retained by
us in any way and used as described in this privacy policy.</p>
<p>The app does use third-party services that may collect information used to identify you.</p>
<p>Please refer to the privacy policy of the third-party service provider used by the
application:</p>
<ul>
<li>Google Play Services</li>
<li>Google Analytics for Firebase</li>
<li>Firebase Crashlytics</li>
<li>Unity</li>
<li>AppLovin</li>
<li>Pangle</li>
<li>Mintegral</li>
<li>Bigo</li>
<li>Ironsource</li>
<li>Vungle</li>
</ul>
<h2>Log Data</h2>
<p>We want to inform you that whenever you use our Service, in case of an error in the app, we
collect data and information (through third-party products) on your phone called Log Data. This
Log Data may include information such as your device Internet Protocol (“IP”) address, device
name, operating system version, the configuration of the app when utilizing our Service, the
time and date of your use of the Service, and other statistics.</p>
<h2>Cookies</h2>
<p>Cookies are files with a small amount of data that are commonly used as anonymous unique
identifiers. These are sent to your browser from the websites that you visit and are stored on
your device's internal memory.</p>
<p>This Service does not use these “cookies” explicitly. However, the app may use third-party code
and libraries that use “cookies” to collect information and improve their services. You have the
option to either accept or refuse these cookies and know when a cookie is being sent to your
device. If you choose to refuse our cookies, you may not be able to use some portions of this
Service.</p>
<h2>Service Providers</h2>
<p>We may employ third-party companies and individuals due to the following reasons:</p>
<ul>
<li>To facilitate our Service</li>
<li>To provide the Service on our behalf</li>
<li>To perform Service-related services</li>
<li>To assist us in analyzing how our Service is used</li>
</ul>
<p>We want to inform users of this Service that these third parties have access to their Personal
Information. The reason is to perform the tasks assigned to them on our behalf. However, they
are obligated not to disclose or use the information for any other purpose.</p>
<h2>Security</h2>
<p>We value your trust in providing us your Personal Information, thus we are striving to use
commercially acceptable means of protecting it. But remember that no method of transmission over
the internet, or method of electronic storage is 100% secure and reliable, and we cannot
guarantee its absolute security.</p>
<h2>Links to Other Sites</h2>
<p>This Service may contain links to other sites. If you click on a third-party link, you will be
directed to that site. Note that these external sites are not operated by us. Therefore, we
strongly advise you to review the Privacy Policy of these websites. We have no control over and
assume no responsibility for the content, privacy policies, or practices of any third-party
sites or services.</p>
<h2>Childrens Privacy</h2>
<p>These Services do not address anyone under the age of 13. We do not knowingly collect personally
identifiable information from children under 13 years of age. In the case we discover that a
child under 13 has provided us with personal information, we will immediately delete this from
our servers. If you are a parent or guardian and you are aware that your child has provided us
with personal information, please contact us so that we will be able to take the necessary
actions.</p>
<h2>Changes to This Privacy Policy</h2>
<p>We may update our Privacy Policy from time to time. Thus, you are advised to review this page
periodically for any changes. We will notify you of any changes by posting the new Privacy
Policy on this page.</p>
<h2>Privacy Questions</h2>
<p>We may update the Privacy Policy from time to time. When we change the policy in a material way,
a notice will be posted on our website along with the updated Privacy Policy.</p>
<p>If you have any questions or concerns about our Privacy Policy or data processing, please contact
us: <a href="mailto:alokamalinga207">alokamalinga207</a>.</p>
</body>
</html>

View File

@ -9,6 +9,7 @@ import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
@ -33,6 +34,8 @@ public class SetPWDActivity extends AppCompatActivity {
private List<EditText> etlis = new ArrayList<>();
private int chewkpwd;
private List<ATInterstitial> ads;
private String firstPwd = "";
private String secondPwd = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -90,34 +93,72 @@ public class SetPWDActivity extends AppCompatActivity {
binding.btnContinue.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
updateEditTextBackgrounds();
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(binding.et1.getText().toString());
stringBuilder.append(binding.et2.getText().toString());
stringBuilder.append(binding.et3.getText().toString());
stringBuilder.append(binding.et4.getText().toString());
if (stringBuilder.length() == 4) {
ApplockSkin.savePWD(stringBuilder.toString());
if (chewkpwd == ApplockSkin.checkpwd_0) {
Intent intent = new Intent(SetPWDActivity.this, MainActivity.class);
Toast.makeText(SetPWDActivity.this, getString(R.string.setlock_tips), Toast.LENGTH_SHORT).show();
startActivity(intent);
finish();
// showAd();
if (TextUtils.isEmpty(firstPwd)) {
firstPwd = stringBuilder.toString();
// ApplockSkin.savePWD(stringBuilder.toString());
Log.e("zzj", "---first set pwd---" + stringBuilder.toString());
// etlis.clear();
// stringBuilder.setLength(0);
Log.e("zzj", "---clear stringBuilder---" + stringBuilder.toString());
binding.et1.setText("");
binding.et2.setText("");
binding.et3.setText("");
binding.et4.setText("");
binding.et1.requestFocus();
setupEditTextListeners();
binding.lockText1.setText(R.string.lock_re_enter);
} else {
setupEditTextListeners();
stringBuilder.setLength(0);
stringBuilder.append(binding.et1.getText().toString());
stringBuilder.append(binding.et2.getText().toString());
stringBuilder.append(binding.et3.getText().toString());
stringBuilder.append(binding.et4.getText().toString());
Log.e("zzj", "---set stringBuilder---" + stringBuilder.toString());
secondPwd = stringBuilder.toString();
Log.e("zzj", "---get firstPwd---" + firstPwd);
if (secondPwd.equals(firstPwd)) {
ApplockSkin.savePWD(secondPwd);
Log.e("zzj", "---second set pwd---" + stringBuilder.toString());
if (chewkpwd == ApplockSkin.checkpwd_0) {
Intent intent = new Intent(SetPWDActivity.this, MainActivity.class);
Toast.makeText(SetPWDActivity.this, getString(R.string.setlock_tips), Toast.LENGTH_SHORT).show();
startActivity(intent);
finish();
// showAd();
} else {
// Intent intent = new Intent(SetPWDActivity.this, MainActivity.class);
//
// startActivity(intent);
Toast.makeText(SetPWDActivity.this, getString(R.string.changelock_tips), Toast.LENGTH_SHORT).show();
showAd();
Toast.makeText(SetPWDActivity.this, getString(R.string.changelock_tips), Toast.LENGTH_SHORT).show();
showAd();
}
}
}
} else {
Toast.makeText(SetPWDActivity.this, getString(R.string.text_hint), Toast.LENGTH_SHORT).show();
}
}
});
}
private void updateEditTextBackgrounds() {
for (EditText editText : etlis) {
if (!TextUtils.isEmpty(editText.getText())) {
editText.setBackgroundResource(R.drawable.stepwd_check);
} else {
editText.setBackgroundResource(R.drawable.stepwd_uncheck);
}
}
}
private void setupEditTextListeners() {
for (int i = 0; i < etlis.size(); i++) {
@ -154,13 +195,14 @@ public class SetPWDActivity extends AppCompatActivity {
currentEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (currentEditText.getText().length() > 0) {
if (!TextUtils.isEmpty(currentEditText.getText())) {
currentEditText.setBackgroundResource(R.drawable.stepwd_check);
} else {
currentEditText.setBackgroundResource(R.drawable.stepwd_uncheck);
}
}
});
}
}
}

View File

@ -29,6 +29,45 @@ public class SettingActivity extends AppCompatActivity {
return insets;
});
initEvent();
}
private void initEvent() {
binding.privacy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(SettingActivity.this, WebActivity.class);
startActivity(intent);
}
});
binding.verisonText.setText("1.0.2");
binding.rate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String url = "https://play.google.com/store/apps/details?id=com.tool.lockapp";
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
startActivity(intent);
}
});
binding.share.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("text/plain");
share.putExtra(Intent.EXTRA_SUBJECT, R.string.app_name);
String text = getString(R.string.share_title);
text = text + "\n https://play.google.com/store/apps/details?id=" + "com.tool.lockapp";
share.putExtra(Intent.EXTRA_TEXT, text);
startActivity(Intent.createChooser(share, "choose one"));
}
});
binding.changepwd.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -39,15 +78,6 @@ public class SettingActivity extends AppCompatActivity {
}
});
binding.privacy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://sites.google.com/view/privacy-policy-web-page"));
startActivity(intent);
}
});
binding.cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View File

@ -41,7 +41,7 @@ public class SplashActivity extends AppCompatActivity {
});
ads = ApplockSkin.lodAd();
countDownTimer = new CountDownTimer(10100, 100) {
countDownTimer = new CountDownTimer(1000, 100) {
@Override
public void onTick(long l) {
i++;

View File

@ -0,0 +1,36 @@
package com.tool.applockpro.activity;
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 android.annotation.SuppressLint;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.tool.applockpro.R;
public class WebActivity extends AppCompatActivity {
@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web);
EdgeToEdge.enable(this);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.activity_web), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});
WebView webView = findViewById(R.id.web);
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebViewClient(new WebViewClient());
webView.loadUrl("file:///android_asset/privacy.html");
}
}

View File

@ -123,6 +123,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.AppVH> {
}
})
.show();
}
});
} else {

View File

@ -9,7 +9,7 @@ import com.tool.applockpro.fragment.AllFragment;
import java.util.List;
public class PageAdapter extends FragmentStatePagerAdapter {
public class PageAdapter extends FragmentStatePagerAdapter {
private final List<AllFragment> fragmentList;
public PageAdapter(@NonNull FragmentManager fm, List<AllFragment> list) {

View File

@ -91,7 +91,12 @@ public class AllFragment extends Fragment {
@Override
public void run() {
List<Mydata> list1 = MyDataBase.getINSTANCE().mydao().getappissystem(false);
updateRecyclerView(list1);
requireActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
updateRecyclerView(list1);
}
});
}
});
} else if (tabargs.equals("Lock")) {

View File

@ -5,6 +5,7 @@ import android.content.Context;
import android.graphics.PixelFormat;
import android.graphics.Point;
import android.os.Build;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
@ -85,11 +86,19 @@ public class Mymanager {
layoutParams = new WindowManager.LayoutParams();
layoutParams.type = type;
layoutParams.format = PixelFormat.RGBA_8888;
layoutParams.flags = WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH |
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
WindowManager.LayoutParams.FLAG_FULLSCREEN |
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR;
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS |
WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
layoutParams.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN;
// WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH |
// WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
//// WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
// WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR;
layoutParams.gravity = Gravity.CENTER;
Point screenSize = new Point();
windowManager.getDefaultDisplay().getRealSize(screenSize);
@ -102,14 +111,17 @@ public class Mymanager {
stringBuilder.setLength(0);
Staticvalue.KEY_NUMBER = "";
windowManager.addView(mView, layoutParams);
Log.e("zzj", "------showLockView success---");
}
}
public void unLock() {
try {
windowManager.removeView(mView);
} catch (Exception exception) {
Log.e("zzj", "------unlock success---");
} catch (Exception e) {
e.printStackTrace();
Log.e("zzj", "------unlock error---" + e.getMessage());
}
}

View File

@ -0,0 +1,5 @@
package com.tool.applockpro.tool;
public interface PWDCallBcak {
void getPwd();
}

View File

@ -65,7 +65,7 @@
android:layout_marginTop="20dp"
android:background="@drawable/bg_setting_cons"
android:padding="16dp"
app:layout_constraintTop_toBottomOf="@id/changepwd">
app:layout_constraintTop_toBottomOf="@id/rate">
<TextView
android:layout_width="wrap_content"
@ -85,6 +85,92 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/share"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@drawable/bg_setting_cons"
android:padding="16dp"
app:layout_constraintTop_toBottomOf="@id/changepwd">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/share_text"
android:textColor="@color/black"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/icon_go"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/rate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@drawable/bg_setting_cons"
android:padding="16dp"
app:layout_constraintTop_toBottomOf="@id/share">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/rate_text"
android:textColor="@color/black"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/icon_go"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@drawable/bg_setting_cons"
android:padding="16dp"
app:layout_constraintTop_toBottomOf="@id/privacy">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/version_text"
android:textColor="@color/black"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/verison_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/activity_web"
tools:context=".activity.WebActivity">
<WebView
android:id="@+id/web"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -31,7 +31,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_horizontal"
android:text="@string/lock_hint"
android:text="@string/lock_text1"
android:textColor="@color/white"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -20,4 +20,9 @@
<string name="text_null">Query is empty</string>
<string name="lock_title">Confirm Your PIN</string>
<string name="lock_hint">Crea un Pin de ingreso de 4 digitos</string>
<string name="share_text">Share</string>
<string name="rate_text">Rate</string>
<string name="version_text">Version</string>
<string name="share_title">Here is a Lock App</string>
<string name="lock_re_enter">Please re-enter the 4-digit \n password you just created</string>
</resources>