Merge "Controls Ui - More string adjustments" into rvc-dev am: 294823f0cb

Change-Id: Ieaa12661c885fcfde6ecca4bf5364f91ef6fb261
This commit is contained in:
TreeHugger Robot
2020-03-24 20:49:03 +00:00
committed by Automerger Merge Worker
4 changed files with 13 additions and 14 deletions

View File

@@ -50,7 +50,6 @@
<TextView
style="@style/TextAppearance.ControlSetup.Subtitle"
android:id="@+id/controls_subtitle"
android:visibility="gone"
android:layout_marginTop="12dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -2636,14 +2636,17 @@
<!-- Quick Controls strings -->
<!-- Quick Controls empty state, title [CHAR LIMIT=30] -->
<string name="quick_controls_title">Quick Controls</string>
<string name="quick_controls_title">Quick controls</string>
<!-- Quick Controls empty state, subtitle [CHAR LIMIT=100] -->
<string name="quick_controls_subtitle">Add controls for your connected devices</string>
<!-- Controls management providers screen title [CHAR LIMIT=30]-->
<string name="controls_providers_title">Add Controls</string>
<!-- Controls management providers screen subtitle [CHAR LIMIT=NONE] -->
<string name="controls_providers_subtitle">Choose app to add controls</string>
<!-- Quick Controls setup, title [CHAR LIMIT=50] -->
<string name="quick_controls_setup_title">Set up quick controls</string>
<!-- Quick Controls setup, subtitle [CHAR LIMIT=100] -->
<string name="quick_controls_setup_subtitle">Hold the Power button to access your controls</string>
<!-- Controls management providers screen title [CHAR LIMIT=60]-->
<string name="controls_providers_title">Choose app to add controls</string>
<!-- Number of favorites for controls management screen [CHAR LIMIT=NONE]-->
<plurals name="controls_number_of_favorites">
<item quantity="one"><xliff:g id="number" example="1">%s</xliff:g> control added.</item>
@@ -2679,12 +2682,8 @@
<string name="controls_pin_verifying">Verifying\u2026</string>
<!-- Controls PIN entry dialog, text hint [CHAR LIMIT=30] -->
<string name="controls_pin_instructions">Enter PIN</string>
<!-- Controls passphrase entry dialog, text hint [CHAR LIMIT=30] -->
<string name="controls_passphrase_instructions">Enter passphrase</string>
<!-- Controls PIN entry dialog, text hint, retry [CHAR LIMIT=30] -->
<string name="controls_pin_instructions_retry">Try another PIN</string>
<!-- Controls passphrase entry dialog, text hint, retry [CHAR LIMIT=50] -->
<string name="controls_passphrase_instructions_retry">Try another passphrase</string>
<!-- Controls confirmation dialog, waiting to confirm [CHAR LIMIT=30] -->
<string name="controls_confirmation_confirming">Confirming\u2026</string>
<!-- Controls confirmation dialog, user prompt [CHAR LIMIT=NONE] -->

View File

@@ -84,8 +84,6 @@ class ControlsProviderSelectorActivity @Inject constructor(
requireViewById<TextView>(R.id.title).text =
resources.getText(R.string.controls_providers_title)
requireViewById<TextView>(R.id.subtitle).text =
resources.getText(R.string.controls_providers_subtitle)
requireViewById<Button>(R.id.done).setOnClickListener {
this@ControlsProviderSelectorActivity.finishAffinity()
@@ -117,4 +115,4 @@ class ControlsProviderSelectorActivity @Inject constructor(
currentUserTracker.stopTracking()
super.onDestroy()
}
}
}

View File

@@ -172,7 +172,7 @@ class ControlsUiControllerImpl @Inject constructor (
val inflater = LayoutInflater.from(context)
inflater.inflate(R.layout.controls_no_favorites, parent, true)
val subtitle = parent.requireViewById<TextView>(R.id.controls_subtitle)
subtitle.setVisibility(View.VISIBLE)
subtitle.setText(context.resources.getString(R.string.controls_seeding_in_progress))
}
private fun showInitialSetupView(items: List<SelectionItem>) {
@@ -184,6 +184,9 @@ class ControlsUiControllerImpl @Inject constructor (
val viewGroup = parent.requireViewById(R.id.controls_no_favorites_group) as ViewGroup
viewGroup.setOnClickListener(launchSelectorActivityListener(context))
val subtitle = parent.requireViewById<TextView>(R.id.controls_subtitle)
subtitle.setText(context.resources.getString(R.string.quick_controls_subtitle))
val iconRowGroup = parent.requireViewById(R.id.controls_icon_row) as ViewGroup
items.forEach {
val imageView = inflater.inflate(R.layout.controls_icon, viewGroup, false) as ImageView