diff --git a/src/main/res/values-zh/strings.xml b/src/main/res/values-zh/strings.xml
index 6a58ed3b..4c84e9df 100755
--- a/src/main/res/values-zh/strings.xml
+++ b/src/main/res/values-zh/strings.xml
@@ -85,6 +85,10 @@
状态码无效。(#%d)
+ 配置文件
+ • 点击选择配置文件;\n• 滑动删除;\n•
+ 长按拖动改变顺序。
+ 好的
为影梭添加此配置文件?
扫描二维码
手动设置
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 2affac0a..2bbab003 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -103,6 +103,10 @@
Failed to import.
+ Profiles
+ • Tap to select a profile;\n• Swipe to remove;\n•
+ Long press to reorder profiles.
+ Gotcha!
Add this Shadowsocks Profile?
Scan QR code
Manual Settings
diff --git a/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala b/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala
index 2bf39cc5..3eef2882 100644
--- a/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala
+++ b/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala
@@ -1,7 +1,7 @@
package com.github.shadowsocks
import android.content.Intent
-import android.os.{Handler, Bundle}
+import android.os.{Bundle, Handler}
import android.support.design.widget.Snackbar
import android.support.v7.app.{AlertDialog, AppCompatActivity}
import android.support.v7.widget.RecyclerView.ViewHolder
@@ -25,7 +25,13 @@ import scala.collection.mutable.ArrayBuffer
/**
* @author Mygod
*/
+object ProfileManagerActivity {
+ private final val profileTip = "profileTip"
+}
+
class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClickListener with ServiceBoundContext {
+ import ProfileManagerActivity._
+
private class ProfileViewHolder(val view: View) extends RecyclerView.ViewHolder(view) with View.OnClickListener {
private var item: Profile = _
private val text = itemView.findViewById(android.R.id.text1).asInstanceOf[CheckedTextView]
@@ -204,6 +210,12 @@ class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClickListe
def trafficUpdated(txRate: String, rxRate: String, txTotal: String, rxTotal: String) =
if (selectedItem != null) selectedItem.updateText(true)
})
+
+ if (ShadowsocksApplication.settings.getBoolean(profileTip, true)) {
+ ShadowsocksApplication.settings.edit.putBoolean(profileTip, false).commit
+ new AlertDialog.Builder(this).setTitle(R.string.profile_manager_dialog)
+ .setMessage(R.string.profile_manager_dialog_content).setPositiveButton(R.string.gotcha, null).create.show
+ }
}
override def onDestroy {