Search code examples
xml

How to GridView All Installed Apps


How to GridView the All Installed Apps ;

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:paddingStart="10dp"
    android:background="@drawable/background"
    android:paddingEnd="10dp">

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Installed Apps"
        android:textStyle="bold"
        android:textSize="18sp"
        android:paddingTop="18dp"
        android:paddingBottom="6dp"
        android:gravity="center"/>


</LinearLayout>

i want to Display the apps in GridView Thankyou!


Solution

  • Add this in your Xml file ;

        <GridView
            android:id="@+id/grid"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:numColumns="6"
            android:verticalSpacing="20dip" />