Update recovery password banner
parent
4dd451e77f
commit
8b1751d40d
@ -1,59 +0,0 @@
|
||||
package org.thoughtcrime.securesms.onboarding
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import network.loki.messenger.databinding.ViewSeedReminderBinding
|
||||
|
||||
class SeedReminderView : FrameLayout {
|
||||
private lateinit var binding: ViewSeedReminderBinding
|
||||
|
||||
var title: CharSequence
|
||||
get() = binding.titleTextView.text
|
||||
set(value) { binding.titleTextView.text = value }
|
||||
var subtitle: CharSequence
|
||||
get() = binding.subtitleTextView.text
|
||||
set(value) { binding.subtitleTextView.text = value }
|
||||
var delegate: SeedReminderViewDelegate? = null
|
||||
|
||||
constructor(context: Context) : super(context) {
|
||||
setUpViewHierarchy()
|
||||
}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
||||
setUpViewHierarchy()
|
||||
}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
|
||||
setUpViewHierarchy()
|
||||
}
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {
|
||||
setUpViewHierarchy()
|
||||
}
|
||||
|
||||
private fun setUpViewHierarchy() {
|
||||
binding = ViewSeedReminderBinding.inflate(LayoutInflater.from(context), this, true)
|
||||
binding.button.setOnClickListener { delegate?.handleSeedReminderViewContinueButtonTapped() }
|
||||
}
|
||||
|
||||
fun setProgress(progress: Int, isAnimated: Boolean) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
binding.progressBar.setProgress(progress, isAnimated)
|
||||
} else {
|
||||
binding.progressBar.progress = progress
|
||||
}
|
||||
}
|
||||
|
||||
fun hideContinueButton() {
|
||||
binding.button.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
interface SeedReminderViewDelegate {
|
||||
|
||||
fun handleSeedReminderViewContinueButtonTapped()
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="15dp"
|
||||
android:height="17dp"
|
||||
android:viewportWidth="15"
|
||||
android:viewportHeight="17">
|
||||
<path
|
||||
android:pathData="M6.938,0.486C7.132,0.399 7.334,0.354 7.54,0.354L7.543,0.36C7.742,0.36 7.939,0.402 8.135,0.488C8.375,0.597 8.621,0.7 8.867,0.804L9.15,0.924L10.484,1.499C10.918,1.685 11.352,1.871 11.786,2.058C12.413,2.327 13.042,2.597 13.67,2.866C14.263,3.12 14.587,3.636 14.538,4.236C14.534,4.268 14.535,4.313 14.537,4.362V4.362V4.362C14.537,4.39 14.538,4.418 14.538,4.448C14.541,4.518 14.541,4.59 14.541,4.674C14.532,5.436 14.532,6.211 14.541,6.973V6.987L14.538,7.001V7.266L14.538,7.27V7.27C14.535,7.54 14.532,7.812 14.524,8.075C14.509,8.776 14.37,9.44 14.249,9.939L14.24,9.973L14.229,10.006C14.125,10.347 14.006,10.71 13.853,11.083C13.647,11.575 13.378,12.08 13.028,12.629L13.014,12.652L12.997,12.674C12.583,13.26 12.198,13.718 11.788,14.117C11.114,14.77 10.354,15.305 9.524,15.715C9.511,15.722 9.497,15.73 9.483,15.738C9.476,15.742 9.469,15.746 9.461,15.75C9.455,15.753 9.449,15.757 9.443,15.76L9.399,15.783L9.356,15.802C8.951,15.975 8.468,16.167 7.939,16.304L7.927,16.31H7.916C7.788,16.34 7.658,16.354 7.534,16.354C7.41,16.354 7.282,16.34 7.146,16.307C6.652,16.181 6.149,16 5.651,15.769L5.643,15.76H5.634C4.214,15.074 3.034,14.058 2.126,12.744L2.086,12.699L2.042,12.629C1.727,12.13 1.49,11.695 1.296,11.262C1.137,10.904 1.02,10.554 0.907,10.214L0.9,10.193L0.857,10.065L0.836,10.001L0.822,9.937L0.796,9.812L0.77,9.688L0.763,9.658C0.705,9.383 0.644,9.1 0.608,8.801C0.543,8.311 0.544,7.845 0.544,7.399L0.544,7.297V7.166V6.982V4.652V4.423C0.544,4.385 0.545,4.349 0.545,4.314C0.546,4.246 0.546,4.183 0.544,4.124C0.521,3.583 0.816,3.125 1.351,2.888C1.921,2.644 2.49,2.4 3.059,2.156C3.628,1.911 4.197,1.667 4.766,1.423L5.799,0.98L5.842,0.96L5.914,0.927L5.938,0.915C5.982,0.896 6.027,0.877 6.071,0.858L6.072,0.858C6.153,0.823 6.235,0.788 6.316,0.754C6.377,0.728 6.437,0.702 6.498,0.676L6.498,0.676L6.498,0.676C6.645,0.613 6.793,0.551 6.938,0.486ZM8.416,7.697L9.764,8.409C10.07,8.57 10.324,8.806 10.501,9.093C10.678,9.379 10.772,9.705 10.772,10.038C10.771,10.494 10.581,10.931 10.242,11.254C9.903,11.576 9.444,11.758 8.965,11.758H5.773C5.582,11.76 5.393,11.726 5.216,11.658C5.039,11.59 4.879,11.489 4.743,11.362C4.607,11.234 4.499,11.082 4.426,10.914C4.352,10.747 4.315,10.567 4.315,10.385C4.315,10.203 4.352,10.023 4.426,9.856C4.499,9.688 4.607,9.536 4.743,9.408C4.879,9.28 5.039,9.18 5.216,9.112C5.393,9.043 5.582,9.01 5.773,9.012H6.689L5.34,8.3C5.034,8.139 4.78,7.903 4.602,7.616C4.425,7.33 4.332,7.003 4.331,6.671C4.332,6.215 4.522,5.778 4.861,5.455C5.2,5.133 5.659,4.951 6.138,4.951H9.33C9.712,4.951 10.079,5.095 10.349,5.353C10.62,5.61 10.772,5.96 10.772,6.324C10.772,6.688 10.62,7.038 10.349,7.295C10.079,7.553 9.712,7.697 9.33,7.697H8.416ZM4.996,7.415C5.132,7.629 5.325,7.806 5.555,7.927L7.329,8.863V7.462C7.329,7.412 7.35,7.363 7.387,7.328C7.424,7.292 7.475,7.272 7.528,7.272H9.33C9.465,7.272 9.598,7.245 9.722,7.195C9.846,7.144 9.958,7.07 10.051,6.977C10.144,6.884 10.216,6.774 10.263,6.653C10.31,6.533 10.33,6.404 10.324,6.276C10.297,5.766 9.836,5.376 9.301,5.376H6.172C5.405,5.376 4.761,5.974 4.779,6.705C4.785,6.955 4.86,7.2 4.996,7.415ZM5.802,11.333H8.931C9.699,11.333 10.343,10.734 10.325,10.005C10.318,9.754 10.244,9.509 10.107,9.295C9.971,9.08 9.778,8.903 9.548,8.781L7.775,7.846V9.247C7.775,9.272 7.77,9.297 7.76,9.32C7.75,9.343 7.735,9.364 7.717,9.381C7.698,9.399 7.676,9.413 7.652,9.423C7.628,9.432 7.602,9.437 7.575,9.437H5.773C5.638,9.437 5.505,9.464 5.381,9.514C5.257,9.565 5.145,9.639 5.052,9.732C4.96,9.825 4.887,9.935 4.841,10.056C4.794,10.176 4.773,10.304 4.779,10.433C4.806,10.943 5.267,11.333 5.802,11.333Z"
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
@ -1,76 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/accent_line_thickness"
|
||||
android:paddingLeft="-2dp"
|
||||
android:paddingRight="-2dp"
|
||||
android:progressTint="?colorAccent"
|
||||
android:progress="80" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="@dimen/medium_spacing"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:textColor"
|
||||
android:textSize="@dimen/small_font_size"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/view_seed_reminder_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitleTextView"
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="?android:textColor"
|
||||
android:textSize="@dimen/very_small_font_size"
|
||||
android:lines="2"
|
||||
android:alpha="0.6"
|
||||
android:text="@string/view_seed_reminder_subtitle_1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="4dp" />
|
||||
|
||||
<Button
|
||||
style="@style/Widget.Session.Button.Common.ProminentOutline"
|
||||
android:id="@+id/button"
|
||||
android:contentDescription="@string/AccessibilityId_continue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:textStyle="normal"
|
||||
android:text="@string/continue_2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?android:dividerHorizontal" />
|
||||
|
||||
</LinearLayout>
|
@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/accent_line_thickness"
|
||||
android:paddingLeft="-2dp"
|
||||
android:paddingRight="-2dp"
|
||||
android:progressTint="?colorAccent"
|
||||
android:progress="80" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/AccessibilityId_recovery_phrase_reminder"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="@dimen/medium_spacing"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/small_font_size"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/view_seed_reminder_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitleTextView"
|
||||
android:layout_width="224dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/very_small_font_size"
|
||||
android:lines="2"
|
||||
android:alpha="0.6"
|
||||
android:text="@string/view_seed_reminder_subtitle_1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="4dp" />
|
||||
|
||||
<Button
|
||||
style="@style/Widget.Session.Button.Common.ProminentOutline"
|
||||
android:contentDescription="@string/AccessibilityId_continue"
|
||||
android:id="@+id/button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:textStyle="normal"
|
||||
android:text="@string/continue_2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?android:dividerHorizontal" />
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue