For #6198: Update copy and position of pair QR code scan message.
parent
44d9dc9237
commit
6e325d6242
|
@ -12,11 +12,9 @@ import android.os.Vibrator
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.content.getSystemService
|
import androidx.core.content.getSystemService
|
||||||
import androidx.core.text.HtmlCompat
|
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.navigation.fragment.NavHostFragment.findNavController
|
import androidx.navigation.fragment.NavHostFragment.findNavController
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import kotlinx.android.synthetic.main.fragment_pair.*
|
|
||||||
import mozilla.components.feature.qr.QrFeature
|
import mozilla.components.feature.qr.QrFeature
|
||||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||||
|
@ -31,11 +29,6 @@ class PairFragment : Fragment(R.layout.fragment_pair), UserInteractionHandler {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
pairInstructions.text = HtmlCompat.fromHtml(
|
|
||||||
getString(R.string.pair_instructions),
|
|
||||||
HtmlCompat.FROM_HTML_MODE_LEGACY
|
|
||||||
)
|
|
||||||
|
|
||||||
qrFeature.set(
|
qrFeature.set(
|
||||||
QrFeature(
|
QrFeature(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
|
@ -64,7 +57,8 @@ class PairFragment : Fragment(R.layout.fragment_pair), UserInteractionHandler {
|
||||||
R.id.turnOnSyncFragment,
|
R.id.turnOnSyncFragment,
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
}),
|
},
|
||||||
|
scanMessage = R.string.pair_instructions_2),
|
||||||
owner = this,
|
owner = this,
|
||||||
view = view
|
view = view
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,23 +1,9 @@
|
||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/pair_layout"
|
android:id="@+id/pair_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
<TextView
|
</LinearLayout>
|
||||||
android:id="@+id/pairInstructions"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:background="#8000"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/pair_instructions"
|
|
||||||
android:textColor="@color/photonWhite"
|
|
||||||
android:textSize="20sp" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
|
@ -365,7 +365,7 @@
|
||||||
|
|
||||||
<!-- Pairing Feature strings -->
|
<!-- Pairing Feature strings -->
|
||||||
<!-- Instructions on how to access pairing -->
|
<!-- Instructions on how to access pairing -->
|
||||||
<string name="pair_instructions"><![CDATA[Visit <b>firefox.com/pair</b> in Firefox on your computer to get your QR code.]]></string>
|
<string name="pair_instructions_2"><![CDATA[Scan the QR code shown at <b>firefox.com/pair</b>]]></string>
|
||||||
<!-- Button to open camera for pairing -->
|
<!-- Button to open camera for pairing -->
|
||||||
<string name="pair_open_camera">Open Camera</string>
|
<string name="pair_open_camera">Open Camera</string>
|
||||||
<!-- Button to cancel pairing -->
|
<!-- Button to cancel pairing -->
|
||||||
|
|
Loading…
Reference in New Issue