|
|
@@ -347,6 +347,7 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener,
|
|
|
private val profileClassLabel: TextView = root.requireViewById(R.id.profile_class_label)
|
|
|
private val profileClass: TextView = root.requireViewById(R.id.profile_class)
|
|
|
private val profileMenu: ImageButton = root.requireViewById(R.id.profile_menu)
|
|
|
+ private val profileSeqNumber: TextView = root.requireViewById(R.id.profile_sequence_number)
|
|
|
|
|
|
init {
|
|
|
iccid.setOnClickListener {
|
|
|
@@ -366,7 +367,9 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener,
|
|
|
true
|
|
|
}
|
|
|
|
|
|
- profileMenu.setOnClickListener { showOptionsMenu() }
|
|
|
+ profileMenu.setOnClickListener {
|
|
|
+ showOptionsMenu()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private lateinit var profile: LocalProfileInfo
|
|
|
@@ -396,6 +399,13 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener,
|
|
|
iccid.transformationMethod = PasswordTransformationMethod.getInstance()
|
|
|
}
|
|
|
|
|
|
+ fun setProfileSequenceNumber(index: Int) {
|
|
|
+ profileSeqNumber.text = root.context.getString(
|
|
|
+ R.string.profile_sequence_number_format,
|
|
|
+ index,
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
private fun showOptionsMenu() {
|
|
|
// Prevent users from doing multiple things at once
|
|
|
if (invalid || swipeRefresh.isRefreshing) return
|
|
|
@@ -461,6 +471,7 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener,
|
|
|
when (holder) {
|
|
|
is ProfileViewHolder -> {
|
|
|
holder.setProfile(profiles[position])
|
|
|
+ holder.setProfileSequenceNumber(position + 1)
|
|
|
}
|
|
|
is FooterViewHolder -> {
|
|
|
holder.attach(footerViews[position - profiles.size])
|