add asterisks at entering pin code
This commit is contained in:
parent
b10306a9b9
commit
67d6b0482e
3 changed files with 26 additions and 1 deletions
|
@ -8,6 +8,7 @@ import com.andrognito.patternlockview.PatternLockView
|
|||
import com.andrognito.patternlockview.listener.PatternLockViewListener
|
||||
import com.andrognito.patternlockview.utils.PatternLockUtils
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.gallery.R
|
||||
import com.simplemobiletools.gallery.extensions.config
|
||||
import kotlinx.android.synthetic.main.tab_pattern.view.*
|
||||
|
@ -20,7 +21,7 @@ class PatternTab(context: Context, attrs: AttributeSet) : RelativeLayout(context
|
|||
override fun onFinishInflate() {
|
||||
super.onFinishInflate()
|
||||
val textColor = context.config.textColor
|
||||
pattern_lock_title.setTextColor(textColor)
|
||||
context.updateTextColors(pattern_lock_holder)
|
||||
pattern_lock_view.correctStateColor = context.config.primaryColor
|
||||
pattern_lock_view.normalStateColor = textColor
|
||||
pattern_lock_view.addPatternLockListener(object : PatternLockViewListener {
|
||||
|
|
|
@ -3,9 +3,12 @@ package com.simplemobiletools.gallery.views
|
|||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.widget.RelativeLayout
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import kotlinx.android.synthetic.main.tab_pin.view.*
|
||||
|
||||
class PinTab(context: Context, attrs: AttributeSet) : RelativeLayout(context, attrs) {
|
||||
override fun onFinishInflate() {
|
||||
super.onFinishInflate()
|
||||
context.updateTextColors(pin_lock_holder)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,4 +5,25 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/pin_lock_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/small_margin"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/enter_pin"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/pin_lock_current_pin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/pin_lock_title"
|
||||
android:gravity="center"
|
||||
android:letterSpacing="1.05"
|
||||
android:paddingBottom="@dimen/small_margin"
|
||||
android:paddingTop="@dimen/small_margin"
|
||||
android:textSize="@dimen/big_text_size"/>
|
||||
|
||||
</com.simplemobiletools.gallery.views.PinTab>
|
||||
|
|
Loading…
Reference in a new issue