0

I am making an android launcher, and i need to know how i can load all the apps into a gridview. I want system stuff like calculator and all of that to show up as well. How can i do that? I have search for a long time now without any solution. Please help me and thanks very much!

Java code:

package com.mysoftware.mysoftwareos.launcher;

import java.util.List;

import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.GridView;
import android.widget.LinearLayout;

public class AllAppsActivity extends Activity {
LinearLayout allappsLayout;
GridView allappsGridView;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.allapps_screen);

    //Import views
    allappsLayout = (LinearLayout)findViewById(R.id.allappsLayout);
    allappsGridView = (GridView)findViewById(R.id.allappsGridView);

    //Setup animation for the main layout
    Animation a = AnimationUtils.loadAnimation(this, R.anim.fadeout);
    a.reset();
    allappsLayout.clearAnimation();
    allappsLayout.startAnimation(a);

    //Load all apps into the apptray
}
}

My xml layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/allappsLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/wallpaper"
android:orientation="vertical" >




<GridView
    android:id="@+id/allappsGridView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:numColumns="3" >

</GridView>

</LinearLayout>
user1446632
  • 417
  • 2
  • 9
  • 24

1 Answers1

0

ADW.Launcher is an open source android launcher...

browse around: http://code.google.com/p/adw-launcher-android/

Idan
  • 2,819
  • 4
  • 33
  • 61
  • yeah, but there are litterary just tons of code there, i really dont like to dig aaround in it for an hour, and then havving to do my best of implementing it to my new launcher, my launcher is completely different kind. I need some answers telling me how to add this into my launcher – user1446632 Oct 06 '12 at 10:03
  • feeling lazy ah? take a look at this: http://stackoverflow.com/questions/2695746/how-to-get-a-list-of-installed-android-applications-and-pick-one-to-run – Idan Oct 06 '12 at 21:13