Updated the Material Components library to 1.1.0-alpha04 and fixed some issues presented because of the migration.
This commit is contained in:
parent
8ba40899cf
commit
25bab08b5e
9 changed files with 30 additions and 20 deletions
|
@ -72,7 +72,7 @@ dependencies {
|
|||
// Google
|
||||
implementation 'com.google.zxing:core:3.3.1'
|
||||
implementation 'com.google.code.gson:gson:2.8.5'
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.1.0-alpha04'
|
||||
implementation 'com.google.android.gms:play-services-maps:16.1.0'
|
||||
implementation 'com.google.maps.android:android-maps-utils:0.5'
|
||||
// AAC Lifecycle
|
||||
|
@ -103,6 +103,7 @@ dependencies {
|
|||
implementation 'com.itextpdf:itextpdf:5.5.13'
|
||||
implementation 'com.opencsv:opencsv:3.7'
|
||||
// Others
|
||||
api 'com.google.guava:guava:27.0.1-android'
|
||||
implementation 'org.bitcoinj:bitcoinj-core:0.14.3'
|
||||
implementation 'com.moldedbits.r2d2:r2d2:1.0.1'
|
||||
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
|
||||
|
@ -121,3 +122,15 @@ dependencies {
|
|||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||
androidTestImplementation 'com.jraska.livedata:testing-ktx:1.0.0'
|
||||
}
|
||||
|
||||
// Added to avoid the compilation problem due to a duplicate ListenableFuture library
|
||||
afterEvaluate {
|
||||
configurations.all {
|
||||
def group = 'com.google.guava', name = 'guava', version = '27.0.1-android'
|
||||
resolutionStrategy.eachDependency { details ->
|
||||
if (requested.group == group && requested.name == name) {
|
||||
details.useTarget group: details.requested.group, name: name, version: version
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ abstract class BaseSecurityLockDialog : DialogFragment() {
|
|||
super.onResume()
|
||||
|
||||
// Force dialog fragment to use the full width of the screen
|
||||
val dialogWindow = dialog.window
|
||||
val dialogWindow = dialog?.window
|
||||
dialogWindow?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||
}
|
||||
|
||||
|
|
|
@ -127,8 +127,8 @@ class EReceiptFragment : Fragment() {
|
|||
inflater.inflate(R.menu.menu_e_receipt, menu)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem?): Boolean {
|
||||
if (item?.itemId == R.id.menu_share) {
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
if (item.itemId == R.id.menu_share) {
|
||||
verifyStoragePermission()
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -314,8 +314,8 @@ class MerchantsFragment : Fragment(), OnMapReadyCallback, SearchView.OnSuggestio
|
|||
return true
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem?): Boolean {
|
||||
if (item?.itemId == R.id.menu_filter) {
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
if (item.itemId == R.id.menu_filter) {
|
||||
// Try to show or dismiss the custom popup window with the merchants and tellers switches
|
||||
if (mPopupWindow?.isShowing == false) {
|
||||
mPopupWindow?.showAsDropDown(toolbar, screenWidth, 8)
|
||||
|
|
|
@ -39,7 +39,7 @@ class PINSecurityLockDialog : BaseSecurityLockDialog() {
|
|||
|
||||
// Request focus to the PIN EditText and automatically show the keyboard when the dialog appears.
|
||||
tietPIN.requestFocus()
|
||||
dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||
dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||
|
||||
setupScreen()
|
||||
|
||||
|
|
|
@ -364,8 +364,8 @@ class ReceiveTransactionFragment : ConnectedFragment() {
|
|||
inflater.inflate(R.menu.menu_receive_transaction, menu)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem?): Boolean {
|
||||
if (item?.itemId == R.id.menu_share) {
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
if (item.itemId == R.id.menu_share) {
|
||||
verifyStoragePermission()
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -574,8 +574,8 @@ class SendTransactionFragment : ConnectedFragment(), ZXingScannerView.ResultHand
|
|||
inflater.inflate(R.menu.menu_send_transaction, menu)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem?): Boolean {
|
||||
if (item?.itemId == R.id.menu_info) {
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
if (item.itemId == R.id.menu_info) {
|
||||
MaterialDialog(context!!).show {
|
||||
customView(R.layout.dialog_send_transaction_info, scrollable = true)
|
||||
positiveButton(android.R.string.ok) { dismiss() }
|
||||
|
|
|
@ -121,8 +121,8 @@ class TransactionsFragment : Fragment(), FilterOptionsDialog.OnFilterOptionsSele
|
|||
searchView.maxWidth = getScreenWidth(activity) * 3 / 5
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem?): Boolean {
|
||||
return when (item?.itemId) {
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.menu_filter -> {
|
||||
val filterOptionsDialog = FilterOptionsDialog.newInstance(
|
||||
filterTransactionsDirection, filterDateRangeAll, filterStartDate * 1000,
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabReceiveTransaction"
|
||||
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="auto"
|
||||
|
@ -39,8 +38,8 @@
|
|||
app:maxImageSize="70dp"
|
||||
app:elevation="@dimen/fab_elevation"
|
||||
app:borderWidth="0dp"
|
||||
app:srcCompat="@drawable/ic_receive"
|
||||
android:backgroundTint="@color/colorReceive"
|
||||
android:src="@drawable/ic_receive"
|
||||
app:layout_constraintHorizontal_bias="0.6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -64,7 +63,6 @@
|
|||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabSendTransaction"
|
||||
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="auto"
|
||||
|
@ -72,8 +70,8 @@
|
|||
app:maxImageSize="70dp"
|
||||
app:elevation="@dimen/fab_elevation"
|
||||
app:borderWidth="0dp"
|
||||
app:srcCompat="@drawable/ic_send"
|
||||
android:backgroundTint="@color/colorSend"
|
||||
android:src="@drawable/ic_send"
|
||||
app:layout_constraintHorizontal_bias="0.4"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/centeredVerticalGuideline"
|
||||
|
@ -84,7 +82,6 @@
|
|||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabSendTransactionCamera"
|
||||
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="52dp"
|
||||
|
@ -92,10 +89,10 @@
|
|||
app:fabSize="auto"
|
||||
app:fabCustomSize="64dp"
|
||||
app:maxImageSize="40dp"
|
||||
app:backgroundTint="?attr/themedColorBackgroundFloating"
|
||||
android:src="@drawable/ic_camera"
|
||||
app:elevation="@dimen/fab_elevation"
|
||||
app:borderWidth="2dp"
|
||||
app:srcCompat="@drawable/ic_camera"
|
||||
app:backgroundTint="?attr/themedColorBackgroundFloating"
|
||||
android:backgroundTint="@color/colorSend"
|
||||
app:layout_constraintTop_toTopOf="@id/fabSendTransaction"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fabSendTransaction"
|
||||
|
|
Loading…
Reference in a new issue