mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix number of icons
This commit is contained in:
@@ -32,7 +32,7 @@ class IconImageStandard : Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor(iconId: Int) {
|
constructor(iconId: Int) {
|
||||||
if (iconId < 0 || iconId > NB_ICONS)
|
if (iconId < 0 || iconId >= NB_ICONS)
|
||||||
this.id = KEY_ID
|
this.id = KEY_ID
|
||||||
else
|
else
|
||||||
this.id = iconId
|
this.id = iconId
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class IconPack(packageName: String, resources: Resources, resourceId: Int) {
|
|||||||
|
|
||||||
// Build the list of icons
|
// Build the list of icons
|
||||||
var num = 0
|
var num = 0
|
||||||
while (num <= NB_ICONS) {
|
while (num < NB_ICONS) {
|
||||||
// To construct the id with name_ic_XX_32dp (ex : classic_ic_08_32dp )
|
// To construct the id with name_ic_XX_32dp (ex : classic_ic_08_32dp )
|
||||||
val resId = resources.getIdentifier(
|
val resId = resources.getIdentifier(
|
||||||
id + "_" + String.format(Locale.ENGLISH, "%02d", num) + "_32dp",
|
id + "_" + String.format(Locale.ENGLISH, "%02d", num) + "_32dp",
|
||||||
@@ -134,6 +134,6 @@ class IconPack(packageName: String, resources: Resources, resourceId: Int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val NB_ICONS = 68
|
const val NB_ICONS = 69
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,12 +24,4 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
app:spanCount="2"
|
app:spanCount="4" />
|
||||||
android:verticalSpacing="32dp"
|
|
||||||
android:paddingTop="20dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:columnWidth="64dp"
|
|
||||||
android:numColumns="auto_fit"
|
|
||||||
android:stretchMode="spacingWidthUniform">
|
|
||||||
</androidx.recyclerview.widget.RecyclerView>
|
|
||||||
|
|||||||
@@ -24,12 +24,4 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
app:spanCount="2"
|
app:spanCount="4" />
|
||||||
android:verticalSpacing="32dp"
|
|
||||||
android:paddingTop="20dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:columnWidth="64dp"
|
|
||||||
android:numColumns="auto_fit"
|
|
||||||
android:stretchMode="spacingWidthUniform">
|
|
||||||
</androidx.recyclerview.widget.RecyclerView>
|
|
||||||
|
|||||||
@@ -17,11 +17,15 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with KeePassDX. If not, see <http://www.gnu.org/licenses/>.
|
along with KeePassDX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<FrameLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/icon_image"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:layout_height="wrap_content"
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:layout_gravity="center"
|
android:id="@+id/icon_image"
|
||||||
android:layout_margin="32dp">
|
android:layout_width="wrap_content"
|
||||||
</androidx.appcompat.widget.AppCompatImageView>
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_margin="16dp">
|
||||||
|
</androidx.appcompat.widget.AppCompatImageView>
|
||||||
|
</FrameLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user