-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* android: fixes #25 (#29) * android: fixes #26 (#30) * android: fixes #33 (#37) * android: fixes #33 * android: fixes #34 #35 #36 * android: move hardcoded strings to strings.xml and increase remote config fetch duration
- Loading branch information
Showing
23 changed files
with
533 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
dtb-android/app/src/main/java/app/roaim/dtbazar/ui/ForceUpdateDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package app.roaim.dtbazar.ui | ||
|
||
import android.content.DialogInterface | ||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.fragment.app.DialogFragment | ||
import app.roaim.dtbazar.R | ||
import app.roaim.dtbazar.databinding.FragmentForceUpdateBinding | ||
import app.roaim.dtbazar.utils.Loggable | ||
import app.roaim.dtbazar.utils.log | ||
import app.roaim.dtbazar.utils.navigateToPlayStore | ||
|
||
class ForceUpdateDialog : DialogFragment(), View.OnClickListener, Loggable { | ||
|
||
private var _binding: FragmentForceUpdateBinding? = null | ||
private val binding get() = _binding!! | ||
|
||
override fun onActivityCreated(savedInstanceState: Bundle?) { | ||
super.onActivityCreated(savedInstanceState) | ||
dialog?.window?.attributes?.windowAnimations = R.style.UpdateDialogAnimation | ||
} | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
savedInstanceState: Bundle? | ||
): View? { | ||
_binding = FragmentForceUpdateBinding.inflate(inflater, container, false) | ||
binding.listener = this | ||
return binding.root | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
} | ||
|
||
override fun onStart() { | ||
super.onStart() | ||
val matchParent = ViewGroup.LayoutParams.MATCH_PARENT | ||
val wrapContent = ViewGroup.LayoutParams.MATCH_PARENT | ||
dialog?.window?.setLayout(matchParent, wrapContent) | ||
} | ||
|
||
override fun onDestroyView() { | ||
log("onDestroyView") | ||
super.onDestroyView() | ||
_binding = null | ||
} | ||
|
||
override fun onClick(v: View?) { | ||
v?.navigateToPlayStore() | ||
} | ||
|
||
override fun onCancel(dialog: DialogInterface) { | ||
super.onCancel(dialog) | ||
requireActivity().finish() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.