Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9078635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:40:25+00:00 2026-06-16T19:40:25+00:00

I am creating a Jigsaw Puzzle application in android. I have created two activites,

  • 0

I am creating a Jigsaw Puzzle application in android. I have created two activites, activity_jigsaw.xml and activity_level.xml. One activity is created by default (Displaying Hello World!) which I modified and created a new activity by following these steps:

File -> New -> Other -> Android Activity

But when I install the application these two files (and all other activities of the application) are installed as a separate project. But at the same time they are also interlinked. The Java code of the files as follows:

Jisaw.java file contains:

public class Jigsaw extends Activity {

    Intent intent;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_jigsaw);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_jigsaw, menu);
        return true;
    }

    public void play(View v)
    {
        try
        {
            intent = new Intent(this, Level.class);
            startActivity(intent);
        }

        catch(Exception e)
        {
            e.printStackTrace();
        }
    }
}

Here Play is a function which is called when an image is clicked.

Level.java file contains:

public class Level extends Activity {

    Intent intent;
    String level = "";

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_level);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_level, menu);
        return true;
    }

    public void easy(View v)
    {
        level = "easy";
        intent = new Intent(this, Play.class);
        intent.putExtra("level", level);
        startActivity(intent);
    }

    public void medium(View v)
    {
        level = "medium";
        intent = new Intent(this, Play.class);
        intent.putExtra("level", level);
        startActivity(intent);

    }

    public void hard(View v)
    {
        level = "hard";
        intent = new Intent(this, Play.class);
        intent.putExtra("level", level);
        startActivity(intent);

    }
}

Functions easy, medium and hard are called when a corresponding image is clicked.

Can somebody please tell me that what I am doing wrong?

Thanks in advance..

Here is the manifest file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.maju.jigsawpuzzle"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

    <uses-permission android:name="android.permission.SET_WALLPAPER" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".Jigsaw"
            android:label="@string/title_activity_jigsaw" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".Level"
            android:label="@string/title_activity_level" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".Play"
            android:label="@string/title_activity_play" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".PlayBoard"
            android:label="@string/title_activity_play_board" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T19:40:26+00:00Added an answer on June 16, 2026 at 7:40 pm

    You probably are defining android.intent.category.LAUNCHER intent category to all the activities in your AndroidManifest.xml, it creates an icon in the app launcher. Activities other than main should not have this intent filter.

    Do something like this:

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity android:name=".JigSaw" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
    
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".Level" />
        <activity android:name=".Play" />
        <activity android:name=".Playboard" />
    </application>
    

    EDIT:
    As you just posted, you are indeed doing that, just remove the intent filter from other activities.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a jigsaw application. When each piece is touched, the idea is that
Creating an ATL project in MSVC seems to create not one but two projects;
Creating a Windows Forms Application in C#, I have a program that I am
I am creating a simple Jigsaw puzzle. In order to do this, I need
I'm hoping there is a better way to the following. I'm creating a jigsaw-type
Creating a JApplet I have 2 Text Fields, a button and a Text Area.
Creating a Blackberry app. Just a beginner, I have searched but couldn't find a
Creating an object with two properties address and distance . Pushing this object into
Creating an Iphone application, I used to perform INSERT QUERY on different databases. But
Creating an index MySQL After I have added the FULLTEXT index, how do I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.