2009/8/27 Tikoze <[email protected]>

>
> I very well may be wrong (I am a very new android developer and
> haven't done something like this yet), but have you tried removing the
> "<category android:name="android.intent.category.LAUNCHER" /> " line
> from the activities you don't want icons for?
>
> I think I read somewhere that the recipe for getting a launchable icon
> is to have both the category LAUNCHER and the action MAIN defined in
> the intent filter.
>
> On Aug 18, 9:45 am, "tinyang" <[email protected]> wrote:
> > If I do that, I can't get to those activities.  I have a main menu screen
> > with a button for each activity, and the buttons don't work for any
> activity
> > in which I remove the intent for from the manifest.  If I remove those
> > intents from the manifest, how else can I make the buttons open my
> > activities?  Here is an example of what I use now:
> >
> > vwpicbtn = (Button) findViewById(R.id.viewpics);
> >
> > vwpicbtn.setOnClickListener(new View.OnClickListener() {
> >
> > public void onClick(View v) {
> >
> > startActivity(new Intent(MainMenu.this, ViewPic.class));
> >
> > }
> > });
> >
> > Thank you.
> >
> >   _____
> >
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Liviu Ungureanu
> > Sent: Tuesday, August 18, 2009 6:30 AM
> > To: [email protected]
> > Subject: [android-beginners] Re: 3 icons for one app
> >
> > Hi!
> >
> > Just remove the intent filter for the others activities less main
> activity.
> > use it only for main activity
> >
> > Thank you!
> >
> > No virus found in this incoming message.
> > Checked by AVG -http://www.avg.com
> > Version: 8.0.169 / Virus Database: 270.13.49/2293 - Release Date:
> 8/17/2009
> > 6:04 PM
> > Hi!
>

 Maybe you have right but i had some problem a few weeks ago..i asked on
this group and someoane give me this response.

I tested it and works..

This is my AndroidManifest file..:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
      package="com.app.lookitup2"
      android:versionCode="1"
      android:versionName="1.0"
      android:icon = "@drawable/icon"
      android:windowSoftInputMode="stateVisible">

      <uses-permission android:name="android.permission.INTERNET"/>
      <uses-permission android:name="android.permission.CALL_PHONE" />
      <uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
      <uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION" />
      <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
      <uses-permission android:name="android.permission.READ_CONTACTS" />


      <application android:icon="@drawable/icon"
android:label="@string/app_name">
      <uses-library android:name="com.google.android.maps" />
        <activity android:name=".MainActivity"
                  android:label="LookItUp"
                  android:windowSoftInputMode="stateVisible|adjustResize">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
         android:name=".ResultsActivity"
 android:label="@string/ResultsTitle">
 <intent-filter>
</intent-filter>
</activity>
<activity
         android:name=".ShowItemDetailsActivity"
 android:label="Item Datails">
 <intent-filter>
</intent-filter>
</activity>
<activity
         android:name=".ItemMap"
 android:label="Map">
 <intent-filter>
</intent-filter>
</activity>
<activity
         android:name=".HistoryActivity"
 android:label="History">
 <intent-filter>
</intent-filter>
</activity>
    </application>
    <uses-sdk android:minSdkVersion="3" />
</manifest>

Maybe will be heplfull.

Have a nice day!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to