diff --git a/app/src/main/assets/cutedns_logo.png b/app/src/main/assets/about_html/cutedns_logo.png
similarity index 100%
rename from app/src/main/assets/cutedns_logo.png
rename to app/src/main/assets/about_html/cutedns_logo.png
diff --git a/app/src/main/assets/ic_launcher.png b/app/src/main/assets/about_html/ic_launcher.png
similarity index 100%
rename from app/src/main/assets/ic_launcher.png
rename to app/src/main/assets/about_html/ic_launcher.png
diff --git a/app/src/main/assets/index.html b/app/src/main/assets/about_html/index.html
similarity index 69%
rename from app/src/main/assets/index.html
rename to app/src/main/assets/about_html/index.html
index e9eb431..70c19d3 100644
--- a/app/src/main/assets/index.html
+++ b/app/src/main/assets/about_html/index.html
@@ -12,19 +12,17 @@
-
- Users must comply with local laws and regulations。
+
+
+ Users must comply with local laws and regulations.
Welcome to CuteDNS! QQ Group: 625385297.
Open the menu to explore more features.
diff --git a/app/src/main/assets/index_zh.html b/app/src/main/assets/about_html/index_zh.html
similarity index 81%
rename from app/src/main/assets/index_zh.html
rename to app/src/main/assets/about_html/index_zh.html
index 5de0767..ec8d82e 100644
--- a/app/src/main/assets/index_zh.html
+++ b/app/src/main/assets/about_html/index_zh.html
@@ -12,19 +12,17 @@
-
-
+
iTX Technologies
-
-
+
Daedalus
null
null
@@ -33,7 +31,8 @@
CuteDNS!
-
+
+
使用者必须遵守当地法律法规。
欢迎加入 CuteDNS! QQ群:625385297 。
打开菜单探索更多功能。
diff --git a/app/src/main/assets/itxtech_logo.png b/app/src/main/assets/about_html/itxtech_logo.png
similarity index 100%
rename from app/src/main/assets/itxtech_logo.png
rename to app/src/main/assets/about_html/itxtech_logo.png
diff --git a/app/src/main/java/org/itxtech/daedalus/AboutActivity.java b/app/src/main/java/org/itxtech/daedalus/AboutActivity.java
index f72d8fc..0437366 100644
--- a/app/src/main/java/org/itxtech/daedalus/AboutActivity.java
+++ b/app/src/main/java/org/itxtech/daedalus/AboutActivity.java
@@ -47,9 +47,9 @@ public boolean onLongClick(View view) {
});
if (Locale.getDefault().getLanguage().equals("zh")) {
- view.loadUrl("file:///android_asset/index_zh.html");
+ view.loadUrl("file:///android_asset/about_html/index_zh.html");
} else {
- view.loadUrl("file:///android_asset/index.html");
+ view.loadUrl("file:///android_asset/about_html/index.html");
}
view.setWebViewClient(new WebViewClient() {
diff --git a/app/src/main/java/org/itxtech/daedalus/MainActivity.java b/app/src/main/java/org/itxtech/daedalus/MainActivity.java
index 85ff9fa..367cca1 100644
--- a/app/src/main/java/org/itxtech/daedalus/MainActivity.java
+++ b/app/src/main/java/org/itxtech/daedalus/MainActivity.java
@@ -27,7 +27,6 @@
* the Free Software Foundation, version 3.
*/
public class MainActivity extends AppCompatActivity {
- private boolean serviceActivated = false;
private SharedPreferences prefs;
@Override
@@ -36,7 +35,6 @@ protected void onCreate(Bundle savedInstanceState) {
initConfig();
- serviceActivated = isServiceActivated();
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
@@ -51,21 +49,19 @@ public void onClick(View v) {
});
final Button but = (Button) findViewById(R.id.button_activate);
- if (serviceActivated) {
- but.setText(R.string.deactivate);
+ if (isServiceActivated()) {
+ but.setText(R.string.button_text_deactivate);
} else {
- but.setText(R.string.activate);
+ but.setText(R.string.button_text_activate);
}
but.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- serviceActivated = isServiceActivated();
- if (serviceActivated) {
+ if (isServiceActivated()) {
+ but.setText(R.string.button_text_activate);
deactivateService();
- but.setText(R.string.activate);
} else {
activateService();
- but.setText(R.string.deactivate);
}
}
});
@@ -76,11 +72,10 @@ protected void onRestart() {
super.onRestart();
final Button but = (Button) findViewById(R.id.button_activate);
- serviceActivated = isServiceActivated();
- if (serviceActivated) {
- but.setText(R.string.deactivate);
+ if (isServiceActivated()) {
+ but.setText(R.string.button_text_deactivate);
} else {
- but.setText(R.string.activate);
+ but.setText(R.string.button_text_activate);
NotificationManager notificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancelAll();
}
@@ -126,6 +121,9 @@ protected void onActivityResult(int request, int result, Intent data) {
DaedalusVpnService.secondaryServer = DnsServers.getDnsServerAddress(prefs.getString("secondary_server", "1"));
startService(getServiceIntent().setAction(DaedalusVpnService.ACTION_ACTIVATE));
+
+
+ ((Button) findViewById(R.id.button_activate)).setText(R.string.button_text_deactivate);
}
}
diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml
index 9f580ee..e4cd884 100644
--- a/app/src/main/res/layout/content_main.xml
+++ b/app/src/main/res/layout/content_main.xml
@@ -34,7 +34,7 @@
android:textAppearance="@android:style/TextAppearance.Material" android:fontFamily="sans-serif"
android:layout_centerHorizontal="true" android:id="@+id/textView_app_name"/>
Daedalus
设置
- 方便易用的基于 CuteDNS 的科学上网工具。
- 启用
- 停用
+ 通过 CuteDNS! 去看看外面的世界。
+ 启用
+ 停用
关于
点击回到 Daedalus
系统设置
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f3c1f02..aa52ae6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,9 +1,9 @@
Daedalus
Settings
- The CuteDNS implementation on Android.
- Activate
- Deactivate
+ Through CuteDNS! to see the world outside.
+ Activate
+ Deactivate
About
Click to back to Daedalus
System settings