Misc string updates
- Use BidiFormat wrap dp number - Update billing cycle starting day string Change-Id: Ifb57e3bb18ced72f91f30599a2ff7bcfa329630f Fix: 37353209 Fix: 37657115 Fix: 38005987 Test: visual
This commit is contained in:
@@ -746,7 +746,7 @@
|
|||||||
<!-- Main Settings screen setting option title for the item to take you to the accounts screen [CHAR LIMIT=22] -->
|
<!-- Main Settings screen setting option title for the item to take you to the accounts screen [CHAR LIMIT=22] -->
|
||||||
<string name="account_settings_title">Accounts</string>
|
<string name="account_settings_title">Accounts</string>
|
||||||
<!-- Main Settings screen setting option title for the item to take you to the security screen -->
|
<!-- Main Settings screen setting option title for the item to take you to the security screen -->
|
||||||
<string name="security_settings_title">Security & Location</string>
|
<string name="security_settings_title">Security & location</string>
|
||||||
<!-- Security Settings screen setting option title for the item to take you to the encryption and credential screen -->
|
<!-- Security Settings screen setting option title for the item to take you to the encryption and credential screen -->
|
||||||
<string name="encryption_and_credential_settings_title">Encryption & credentials</string>
|
<string name="encryption_and_credential_settings_title">Encryption & credentials</string>
|
||||||
<!-- Security Settings screen Encryption and crendential summary -->
|
<!-- Security Settings screen Encryption and crendential summary -->
|
||||||
@@ -7984,10 +7984,7 @@
|
|||||||
<string name="billing_cycle">Billing cycle</string>
|
<string name="billing_cycle">Billing cycle</string>
|
||||||
|
|
||||||
<!-- Summary describing when the billing cycle for their phone carrier starts [CHAR LIMIT=NONE] -->
|
<!-- Summary describing when the billing cycle for their phone carrier starts [CHAR LIMIT=NONE] -->
|
||||||
<string name="billing_cycle_summary">Monthly cycle starts on the <xliff:g name="day" example="1st">%1$s</xliff:g> of every month</string>
|
<string name="billing_cycle_fragment_summary">Monthly on day <xliff:g name="day_of_month" example="17">%1$s</xliff:g></string>
|
||||||
|
|
||||||
<!-- Summary describing when the billing cycle for their phone carrier starts [CHAR LIMIT=NONE] -->
|
|
||||||
<string name="billing_cycle_fragment_summary">Monthly starting <xliff:g name="day_of_month" example="1st">%1$s</xliff:g></string>
|
|
||||||
|
|
||||||
<!-- Title of button and screen for which wifi networks have data restrictions [CHAR LIMIT=30 -->
|
<!-- Title of button and screen for which wifi networks have data restrictions [CHAR LIMIT=30 -->
|
||||||
<string name="network_restrictions">Network restrictions</string>
|
<string name="network_restrictions">Network restrictions</string>
|
||||||
@@ -8201,7 +8198,7 @@
|
|||||||
<string name="page_tab_title_support">Support</string>
|
<string name="page_tab_title_support">Support</string>
|
||||||
|
|
||||||
<!-- Summary of developer options to set the smallest width of the screen [CHAR LIMIT=60]-->
|
<!-- Summary of developer options to set the smallest width of the screen [CHAR LIMIT=60]-->
|
||||||
<string name="developer_density_summary"><xliff:g name="count" example="320">%d</xliff:g> dp</string>
|
<string name="density_pixel_summary" translatable="false"><xliff:g name="count" example="320">%1$s</xliff:g> dp</string>
|
||||||
|
|
||||||
<!-- Title of developer options to set the smallest width of the screen [CHAR LIMIT=60]-->
|
<!-- Title of developer options to set the smallest width of the screen [CHAR LIMIT=60]-->
|
||||||
<string name="developer_smallest_width">Smallest width</string>
|
<string name="developer_smallest_width">Smallest width</string>
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
<com.android.settingslib.RestrictedPreference
|
<com.android.settingslib.RestrictedPreference
|
||||||
android:key="mobile_network_settings"
|
android:key="mobile_network_settings"
|
||||||
android:title="@string/network_settings_title"
|
android:title="@string/network_settings_title"
|
||||||
|
android:summary="@string/summary_placeholder"
|
||||||
android:icon="@drawable/ic_network_cell"
|
android:icon="@drawable/ic_network_cell"
|
||||||
android:dependency="toggle_airplane"
|
android:dependency="toggle_airplane"
|
||||||
android:order="-15"
|
android:order="-15"
|
||||||
|
@@ -101,7 +101,7 @@ public class BillingCycleSettings extends DataUsageBase implements
|
|||||||
|
|
||||||
private void updatePrefs() {
|
private void updatePrefs() {
|
||||||
NetworkPolicy policy = services.mPolicyEditor.getPolicy(mNetworkTemplate);
|
NetworkPolicy policy = services.mPolicyEditor.getPolicy(mNetworkTemplate);
|
||||||
mBillingCycle.setSummary(getString(R.string.billing_cycle_summary, policy != null ?
|
mBillingCycle.setSummary(getString(R.string.billing_cycle_fragment_summary, policy != null ?
|
||||||
policy.cycleDay : 1));
|
policy.cycleDay : 1));
|
||||||
if (policy != null && policy.warningBytes != WARNING_DISABLED) {
|
if (policy != null && policy.warningBytes != WARNING_DISABLED) {
|
||||||
mDataWarning.setSummary(Formatter.formatFileSize(getContext(), policy.warningBytes));
|
mDataWarning.setSummary(Formatter.formatFileSize(getContext(), policy.warningBytes));
|
||||||
|
@@ -16,6 +16,7 @@ package com.android.settings.display;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
import android.text.BidiFormatter;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
@@ -23,10 +24,13 @@ import android.util.Slog;
|
|||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
|
||||||
import com.android.settings.CustomEditTextPreference;
|
import com.android.settings.CustomEditTextPreference;
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settingslib.display.DisplayDensityUtils;
|
import com.android.settingslib.display.DisplayDensityUtils;
|
||||||
|
|
||||||
|
import java.text.NumberFormat;
|
||||||
|
|
||||||
public class DensityPreference extends CustomEditTextPreference {
|
public class DensityPreference extends CustomEditTextPreference {
|
||||||
private static final String TAG = "DensityPreference";
|
private static final String TAG = "DensityPreference";
|
||||||
|
|
||||||
@@ -37,8 +41,9 @@ public class DensityPreference extends CustomEditTextPreference {
|
|||||||
@Override
|
@Override
|
||||||
public void onAttached() {
|
public void onAttached() {
|
||||||
super.onAttached();
|
super.onAttached();
|
||||||
|
final CharSequence dpValue = BidiFormatter.getInstance()
|
||||||
setSummary(getContext().getString(R.string.developer_density_summary, getCurrentSwDp()));
|
.unicodeWrap(NumberFormat.getInstance().format(getCurrentSwDp()));
|
||||||
|
setSummary(getContext().getString(R.string.density_pixel_summary,dpValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getCurrentSwDp() {
|
private int getCurrentSwDp() {
|
||||||
|
Reference in New Issue
Block a user