Skip to content

Commit

Permalink
Fixed gridlayout
Browse files Browse the repository at this point in the history
  • Loading branch information
MansiBhayade committed Sep 21, 2023
1 parent 537029a commit 4d548de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/dev/ukanth/iconmgr/FavoriteAcitvity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.ViewGroup;
import android.widget.GridLayout;
Expand Down Expand Up @@ -33,7 +34,6 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.favorite);
LinearLayout iconPackContainer = findViewById(R.id.icon_pack_container);
List<String> iconName = favDao.geticonName();
gridLayout = (GridLayout) findViewById(R.id.favorite);


if (Prefs.isDarkTheme()) {
Expand Down Expand Up @@ -64,6 +64,9 @@ protected void onCreate(Bundle savedInstanceState) {
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
));
// Set the number of columns for the GridLayout
int numColumns = Prefs.getCol(); // same no of column as settings
iconGridLayout.setColumnCount(numColumns);
// Get the list of icon images for the current iconName
List<byte[]> iconImages = groupedIconImages.get(icon);
// Display the icon images under the TextView
Expand Down

0 comments on commit 4d548de

Please sign in to comment.