diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d45eac2..d2131df 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -10,14 +10,14 @@ android:name=".MainApplication" android:allowBackup="false" android:icon="@mipmap/ic_launcher" - android:label="@string/app_name" + android:label="@string/launch_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme" tools:ignore="GoogleAppIndexingWarning"> @@ -79,6 +79,10 @@ android:label="@string/clash_logs" android:exported="false" android:screenOrientation="portrait" /> + diff --git a/app/src/main/java/com/github/kr328/clash/FeedbackActivity.kt b/app/src/main/java/com/github/kr328/clash/FeedbackActivity.kt new file mode 100644 index 0000000..130c241 --- /dev/null +++ b/app/src/main/java/com/github/kr328/clash/FeedbackActivity.kt @@ -0,0 +1,21 @@ +package com.github.kr328.clash + +import android.os.Bundle +import androidx.preference.PreferenceFragmentCompat +import kotlinx.android.synthetic.main.activity_feedback.* +import kotlinx.android.synthetic.main.activity_main.* + +class FeedbackActivity : BaseActivity() { + class Fragment : PreferenceFragmentCompat() { + override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { + setPreferencesFromResource(R.xml.feedback, rootKey) + } + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_feedback) + + setSupportActionBar(activity_feedback_toolbar) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/github/kr328/clash/MainActivity.kt b/app/src/main/java/com/github/kr328/clash/MainActivity.kt index 06f73d9..ecab269 100644 --- a/app/src/main/java/com/github/kr328/clash/MainActivity.kt +++ b/app/src/main/java/com/github/kr328/clash/MainActivity.kt @@ -1,6 +1,8 @@ package com.github.kr328.clash import android.app.Activity +import android.app.AlertDialog +import android.app.Dialog import android.content.Context import android.content.Intent import android.net.VpnService @@ -49,6 +51,14 @@ class MainActivity : BaseActivity() { startActivity(Intent(this, LogActivity::class.java)) } + activity_main_clash_feedback.setOnClickListener { + startActivity(Intent(this, FeedbackActivity::class.java)) + } + + activity_main_clash_about.setOnClickListener { + showAboutDialog() + } + activity_main_clash_status_icon.setImageResource(R.drawable.ic_clash_stopped) activity_main_clash_status_title.text = getString(R.string.clash_status_stopped) activity_main_clash_status_summary.text = getString(R.string.clash_status_click_to_start) @@ -186,4 +196,8 @@ class MainActivity : BaseActivity() { } } } + + private fun showAboutDialog() { + AlertDialog.Builder(this).setView(R.layout.dialog_about).show() + } } diff --git a/app/src/main/res/layout/activity_feedback.xml b/app/src/main/res/layout/activity_feedback.xml new file mode 100644 index 0000000..438ea22 --- /dev/null +++ b/app/src/main/res/layout/activity_feedback.xml @@ -0,0 +1,22 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_import_file.xml b/app/src/main/res/layout/activity_import_file.xml index dcfd8ae..413511e 100644 --- a/app/src/main/res/layout/activity_import_file.xml +++ b/app/src/main/res/layout/activity_import_file.xml @@ -25,7 +25,7 @@ android:id="@+id/activity_import_file_save" android:padding="10dp" android:src="@drawable/ic_save" - android:contentDescription="@string/app_name" + android:contentDescription="@string/launch_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" diff --git a/app/src/main/res/layout/activity_import_url.xml b/app/src/main/res/layout/activity_import_url.xml index fd5ebfe..d74f0c2 100644 --- a/app/src/main/res/layout/activity_import_url.xml +++ b/app/src/main/res/layout/activity_import_url.xml @@ -25,7 +25,7 @@ android:id="@+id/activity_import_url_save" android:padding="10dp" android:src="@drawable/ic_save" - android:contentDescription="@string/app_name" + android:contentDescription="@string/launch_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" diff --git a/app/src/main/res/layout/adapter_access_app.xml b/app/src/main/res/layout/adapter_access_app.xml index 468f61c..0ff4534 100644 --- a/app/src/main/res/layout/adapter_access_app.xml +++ b/app/src/main/res/layout/adapter_access_app.xml @@ -15,7 +15,7 @@ android:layout_marginTop="20dp" android:layout_width="30dp" android:layout_height="30dp" - android:contentDescription="@string/app_name" /> + android:contentDescription="@string/launch_name" /> diff --git a/app/src/main/res/layout/adapter_proxy_header.xml b/app/src/main/res/layout/adapter_proxy_header.xml index 648fbf8..c821844 100644 --- a/app/src/main/res/layout/adapter_proxy_header.xml +++ b/app/src/main/res/layout/adapter_proxy_header.xml @@ -9,7 +9,7 @@ android:padding="2dp" android:layout_marginStart="2dp" android:textColor="@color/colorAccent" - android:text="@string/app_name" + android:text="@string/launch_name" android:id="@+id/adapter_proxy_header_name" android:layout_width="wrap_content" android:layout_height="wrap_content" /> diff --git a/app/src/main/res/layout/dialog_about.xml b/app/src/main/res/layout/dialog_about.xml new file mode 100644 index 0000000..e2601be --- /dev/null +++ b/app/src/main/res/layout/dialog_about.xml @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_text_edit.xml b/app/src/main/res/layout/dialog_text_edit.xml index 9572f8a..37beaed 100644 --- a/app/src/main/res/layout/dialog_text_edit.xml +++ b/app/src/main/res/layout/dialog_text_edit.xml @@ -11,6 +11,6 @@ android:inputType="text" android:layout_width="match_parent" android:layout_height="match_parent" - android:hint="@string/app_name" /> + android:hint="@string/launch_name" /> \ No newline at end of file diff --git a/app/src/main/res/layout/preference_main_item.xml b/app/src/main/res/layout/preference_main_item.xml index c36b34a..e8ac63d 100644 --- a/app/src/main/res/layout/preference_main_item.xml +++ b/app/src/main/res/layout/preference_main_item.xml @@ -15,7 +15,7 @@ android:layout_marginTop="20dp" android:layout_width="30dp" android:layout_height="30dp" - android:contentDescription="@string/app_name" /> + android:contentDescription="@string/launch_name" /> + android:contentDescription="@string/launch_name" /> - Clash + Clash + Clash for Android Stopped Click here to start @@ -90,4 +91,19 @@ Starting Clash Not Implemented + + Source & Issues + Upstream + Github + + Groups + Telegram Channel + Telegram Group + + https://github.com/Dreamacro/clash + https://github.com/Kr328/ClashForAndroid + https://t.me/clash_for_android + https://t.me/clash_for_android_channel + + Power by Clash diff --git a/app/src/main/res/xml-zh/feedback.xml b/app/src/main/res/xml-zh/feedback.xml new file mode 100644 index 0000000..8a0d439 --- /dev/null +++ b/app/src/main/res/xml-zh/feedback.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/feedback.xml b/app/src/main/res/xml/feedback.xml new file mode 100644 index 0000000..b76a61b --- /dev/null +++ b/app/src/main/res/xml/feedback.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 2edb951..a5bfc6d 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - core + core diff --git a/service/src/main/res/layout/clash_notification.xml b/service/src/main/res/layout/clash_notification.xml index 8eee3a3..19c06f4 100644 --- a/service/src/main/res/layout/clash_notification.xml +++ b/service/src/main/res/layout/clash_notification.xml @@ -5,7 +5,7 @@ android:layout_height="wrap_content"> - Clash + Clash Clash Status Running