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 8559543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:04:29+00:00 2026-06-11T16:04:29+00:00

In my android app, there is a xml file called mylistview : <?xml version=1.0

  • 0

In my android app, there is a xml file called mylistview :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/app_name" />

    <ListView
        android:id="@android:id/list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" />

</LinearLayout>

and there is a MyListView JAva source :

package ir.smspeik.sms;

import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

public class MyListView extends ListActivity {
    /** Called when the activity is first created. */
    TextView selection;
    String[] names;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.mylistview);
        names = new String[] { "sunday", "monday", "tuesday", "wednesday",      
                "thrusday", "friday", "saturday",};      
        this.setListAdapter(new ArrayAdapter<String>(this, R.layout.listlayout, R.id.label,names));     
        selection=(TextView)findViewById(R.id.label);
    }

    public void onListItemClick(ListView parent, View v, int position, long id) {
        selection.setText(names[position]);
    }
}

and I start it by :

ImageButton btnRealState = (ImageButton) findViewById(R.id.imgbtnRealstate);
        btnRealState.setOnClickListener(new View.OnClickListener() {

            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this,
                        ir.smspeik.sms.MyListView.class));
            }
        });

in AndroidManifest.xml :

 <activity
            android:name=".MyListView" android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="ir.smspeik.sms.MyListView" />

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

but when I want to start it this error eaise :

09-14 20:25:56.780: E/AndroidRuntime(760): FATAL EXCEPTION: main
09-14 20:25:56.780: E/AndroidRuntime(760): android.content.ActivityNotFoundException: Unable to find explicit activity class {ir.smspeik.sms/ir.smspeik.sms.MyListView}; have you declared this activity in your AndroidManifest.xml?
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1541)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.app.Activity.startActivityForResult(Activity.java:3351)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.app.Activity.startActivityForResult(Activity.java:3312)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.app.Activity.startActivity(Activity.java:3522)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.app.Activity.startActivity(Activity.java:3490)
09-14 20:25:56.780: E/AndroidRuntime(760):  at ir.smspeik.sms.MainActivity$3.onClick(MainActivity.java:62)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.view.View.performClick(View.java:4084)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.view.View$PerformClick.run(View.java:16966)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.os.Handler.handleCallback(Handler.java:615)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.os.Handler.dispatchMessage(Handler.java:92)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.os.Looper.loop(Looper.java:137)
09-14 20:25:56.780: E/AndroidRuntime(760):  at android.app.ActivityThread.main(ActivityThread.java:4745)
09-14 20:25:56.780: E/AndroidRuntime(760):  at java.lang.reflect.Method.invokeNative(Native Method)
09-14 20:25:56.780: E/AndroidRuntime(760):  at java.lang.reflect.Method.invoke(Method.java:511)
09-14 20:25:56.780: E/AndroidRuntime(760):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
09-14 20:25:56.780: E/AndroidRuntime(760):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-14 20:25:56.780: E/AndroidRuntime(760):  at dalvik.system.NativeStart.main(Native Method)
  • 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-11T16:04:30+00:00Added an answer on June 11, 2026 at 4:04 pm

    You can exclude the package name in startActivity(). Have you tried that?

    public void onClick(View v) {
         startActivity(new Intent(MainActivity.this, MyListView.class));
    }
    

    Your manifest looks ok!

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

Sidebar

Related Questions

I have this website i need to parse for an android app. http://www.wow-coupons.com/rss_online_coupons.xml I
In my Android app, each activity is filled with data from an xml file
My Android app reads a huge XML file using Simple XML . Obviously it
Is there a way in which an Android App calls the Content Provider by
In my android app, there are two processes, let's say process A and B
Is there a resource somewhere that says what pieces of an Android app are
Is there any way to play video in Android App widget.
Is there a way to send -D directives to an android app? On desktop
I am currently developing an android app, there is always unexpected exception popup when
I'm using eclipse to build an android app which is tracked in TFS. There's

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.