Refine profile item layout
This commit is contained in:
@@ -157,8 +157,8 @@ class ProfilesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener {
|
||||
}
|
||||
if (tx <= 0 && rx <= 0) traffic.visibility = View.GONE else {
|
||||
traffic.visibility = View.VISIBLE
|
||||
@SuppressLint("SetTextI18n")
|
||||
traffic.text = "${TrafficMonitor.formatTraffic(tx)}↑\t${TrafficMonitor.formatTraffic(rx)}↓"
|
||||
traffic.text = getString(R.string.traffic,
|
||||
TrafficMonitor.formatTraffic(tx), TrafficMonitor.formatTraffic(rx))
|
||||
}
|
||||
|
||||
if (item.id == DataStore.profileId) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -11,13 +12,16 @@
|
||||
android:nextFocusRight="@+id/edit"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="4dp">
|
||||
android:layout_marginLeft="16dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/text1"
|
||||
@@ -30,7 +34,8 @@
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textStyle="bold"/>
|
||||
android:textStyle="bold"
|
||||
tools:text="@string/profile_name"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:id="@+id/share"
|
||||
@@ -59,10 +64,8 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="4dp">
|
||||
android:layout_marginLeft="16dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/text2"
|
||||
@@ -73,6 +76,7 @@
|
||||
android:layout_toStartOf="@+id/traffic"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
tools:text="@string/profile_plugin"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
|
||||
@@ -82,8 +86,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:ellipsize="end"
|
||||
tools:text="@string/traffic"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
</RelativeLayout>
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<string name="port_transproxy">Transproxy port</string>
|
||||
|
||||
<string name="remote_dns">Remote DNS</string>
|
||||
<string name="traffic" translatable="false">%s↑\t%s↓</string>
|
||||
<string name="stat_summary">Sent: \t\t\t\t\t%3$s\t↑\t%1$s/s\nReceived: \t%4$s\t↓\t%2$s/s</string>
|
||||
<string name="speed">%s/s</string>
|
||||
<plurals name="bytes">
|
||||
|
||||
Reference in New Issue
Block a user