Compare commits
No commits in common. "c65fd5564b407ecf3b010266925fa38bd53c823b" and "b606df5e447f5686bce6e45d0360a4d9efa25757" have entirely different histories.
c65fd5564b
...
b606df5e44
9 changed files with 37 additions and 38 deletions
|
@ -1,16 +0,0 @@
|
|||
package im.angry.openeuicc.ui
|
||||
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
import android.view.Window
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import im.angry.openeuicc.common.R
|
||||
|
||||
abstract class BaseMaterialDialogFragment: DialogFragment() {
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
return super.onCreateDialog(savedInstanceState).also {
|
||||
it.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
||||
it.window?.setBackgroundDrawableResource(R.drawable.dialog_background)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,6 +11,7 @@ import android.widget.ProgressBar
|
|||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
import com.journeyapps.barcodescanner.ScanContract
|
||||
|
@ -23,10 +24,11 @@ import kotlinx.coroutines.Dispatchers
|
|||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import net.typeblog.lpac_jni.LocalProfileNotification
|
||||
import net.typeblog.lpac_jni.ProfileDownloadCallback
|
||||
import kotlin.Exception
|
||||
|
||||
class ProfileDownloadFragment : BaseMaterialDialogFragment(), EuiccFragmentMarker, Toolbar.OnMenuItemClickListener {
|
||||
class ProfileDownloadFragment : DialogFragment(), EuiccFragmentMarker, Toolbar.OnMenuItemClickListener {
|
||||
companion object {
|
||||
const val TAG = "ProfileDownloadFragment"
|
||||
|
||||
|
@ -134,6 +136,7 @@ class ProfileDownloadFragment : BaseMaterialDialogFragment(), EuiccFragmentMarke
|
|||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
return super.onCreateDialog(savedInstanceState).also {
|
||||
it.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
||||
it.setCanceledOnTouchOutside(false)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import android.view.Window
|
|||
import android.widget.ProgressBar
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
import im.angry.openeuicc.common.R
|
||||
|
@ -20,7 +21,7 @@ import kotlinx.coroutines.withContext
|
|||
import java.lang.Exception
|
||||
import java.lang.RuntimeException
|
||||
|
||||
class ProfileRenameFragment : BaseMaterialDialogFragment(), EuiccFragmentMarker {
|
||||
class ProfileRenameFragment : DialogFragment(), EuiccFragmentMarker {
|
||||
companion object {
|
||||
const val TAG = "ProfileRenameFragment"
|
||||
|
||||
|
@ -82,6 +83,7 @@ class ProfileRenameFragment : BaseMaterialDialogFragment(), EuiccFragmentMarker
|
|||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
return super.onCreateDialog(savedInstanceState).also {
|
||||
it.window?.requestFeature(Window.FEATURE_NO_TITLE)
|
||||
it.setCanceledOnTouchOutside(false)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid
|
||||
android:color="?attr/colorSurface"/>
|
||||
<corners
|
||||
android:radius="?attr/dialogCornerRadius" />
|
||||
</shape>
|
|
@ -1,5 +1,5 @@
|
|||
<vector android:autoMirrored="true" android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal" android:viewportHeight="24"
|
||||
android:tint="#000000" android:viewportHeight="24"
|
||||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z"/>
|
||||
</vector>
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:hint="@string/profile_download_server"
|
||||
style="@style/Widget.OpenEUICC.Input"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
@ -47,7 +48,8 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:theme="@style/Theme.OpenEUICC.Input.Cursor"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
@ -57,6 +59,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:hint="@string/profile_download_code"
|
||||
style="@style/Widget.OpenEUICC.Input"
|
||||
app:layout_constraintTop_toBottomOf="@id/profile_download_server"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
@ -66,7 +69,8 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:inputType="textPassword" />
|
||||
android:inputType="textPassword"
|
||||
android:theme="@style/Theme.OpenEUICC.Input.Cursor"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
@ -76,6 +80,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:hint="@string/profile_download_confirmation_code"
|
||||
style="@style/Widget.OpenEUICC.Input"
|
||||
app:layout_constraintTop_toBottomOf="@id/profile_download_code"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
@ -85,7 +90,8 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:inputType="textPassword" />
|
||||
android:inputType="textPassword"
|
||||
android:theme="@style/Theme.OpenEUICC.Input.Cursor"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
@ -96,6 +102,7 @@
|
|||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:hint="@string/profile_download_imei"
|
||||
style="@style/Widget.OpenEUICC.Input"
|
||||
app:layout_constraintTop_toBottomOf="@id/profile_download_confirmation_code"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
@ -106,7 +113,8 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:inputType="textPassword" />
|
||||
android:inputType="textPassword"
|
||||
android:theme="@style/Theme.OpenEUICC.Input.Cursor"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:hint="@string/profile_rename_new_name"
|
||||
style="@style/Widget.OpenEUICC.Input"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
@ -48,7 +49,8 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:theme="@style/Theme.OpenEUICC.Input.Cursor"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
|
|
@ -5,17 +5,23 @@
|
|||
<item name="alertDialogTheme">@style/AlertDialogTheme</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightNavigationBar">?attr/isLightTheme</item>
|
||||
<item name="toolbarStyle">@style/ToolbarTheme</item>
|
||||
<item name="android:statusBarColor">?attr/colorSurfaceVariant</item>
|
||||
<item name="android:colorBackground">?attr/colorSurface</item>
|
||||
<item name="dialogCornerRadius">28dp</item>
|
||||
<item name="toolbarStyle">@style/Widget.Material3.Toolbar</item>
|
||||
<item name="android:statusBarColor">?attr/colorSurface</item>
|
||||
<item name="android:colorBackground">?attr/colorSurface</item>
|
||||
</style>
|
||||
|
||||
<style name="ToolbarTheme" parent="Widget.Material3.Toolbar">
|
||||
<item name="android:background">?attr/colorSurfaceVariant</item>
|
||||
<style name="Theme.OpenEUICC.Input.Cursor" parent="ThemeOverlay.Material3.TextInputEditText.OutlinedBox">
|
||||
<item name="colorControlActivated">?attr/colorSecondary</item>
|
||||
</style>
|
||||
|
||||
<style name="AlertDialogTheme" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||
<style name="Widget.OpenEUICC.Input" parent="Widget.Material3.TextInputLayout.OutlinedBox">
|
||||
<item name="boxBackgroundColor">@android:color/transparent</item>
|
||||
<item name="boxStrokeColor">?attr/colorSecondary</item>
|
||||
<item name="hintTextColor">?attr/colorSecondary</item>
|
||||
</style>
|
||||
|
||||
<style name="AlertDialogTheme" parent="ThemeOverlay.Material3.Dialog.Alert">
|
||||
<item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
|
||||
<item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
|
||||
<item name="dialogCornerRadius">28dp</item>
|
||||
|
|
|
@ -16,6 +16,7 @@ import android.widget.TextView
|
|||
import android.widget.Toast
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -26,7 +27,7 @@ import kotlinx.coroutines.Dispatchers
|
|||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class SlotMappingFragment: BaseMaterialDialogFragment(), OnMenuItemClickListener {
|
||||
class SlotMappingFragment: DialogFragment(), OnMenuItemClickListener {
|
||||
companion object {
|
||||
const val TAG = "SlotMappingFragment"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue