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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:02:40+00:00 2026-06-14T20:02:40+00:00

I want to implement ListView without extend listActivity, and I dont know how to

  • 0

I want to implement ListView without extend listActivity, and I dont know how to implement it. I just cant do getListView(); because I am not extened from listActivity. can you give an example code the I will take care of the listview to do this -> lv.setAdapter(listAdapter)

my xml looks like that

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/linearLa"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >

  <ImageView
        android:id="@+id/iconremove"
        android:layout_width="50dip"
        android:layout_height="50dip"
        android:scaleType="centerCrop"
         android:src="@drawable/removeicon"
      android:visibility="gone"
          />
  <TextView
        android:id="@+id/textView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
            android:layout_gravity="left|center_vertical"
        android:layout_marginLeft="10dip"
        android:layout_weight="1"
        android:textSize="20dip" />

</LinearLayout>

and my code:

public class ListRss extends SherlockActivity  {
    ActionBar actionbar; 
    @SuppressWarnings("unchecked")
    public ArrayList<rssLinkAndTitle> ListRssLinkAndTitle=new ArrayList();
    //public ArrayList listValue=new ArrayList();
    RssArrays rssparser=new RssArrays();
    Context con;
    public void onCreate(Bundle savedInstanceState) {


            super.onCreate(savedInstanceState);
            setContentView(R.layout.titlesrss);
            actionbar=getSupportActionBar();
            con=getApplicationContext();
        //  ListRssAdpter listAdapter;

            ListView    lv = (ListView) findViewById(R.id.linearLa ); 

            lv.setTextFilterEnabled(true);
lv.setAdapter(listAdapter)
  • 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-14T20:02:41+00:00Added an answer on June 14, 2026 at 8:02 pm

    I want to implement ListView without extend listActivity

    Note that there is a SherlockListActivity that you can use.

    I just cant do getListView(); because I am not extened from listActivity.

    Correct. You need to call setContentView() with the ID of a layout resource that contains a ListView. Then, you can retrieve that ListView via findViewById(), the same as you would for any other widget.

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

Sidebar

Related Questions

I want to implement a list of ViewPagers. Every item of a ListView is
Below is my code for setting up a listview. I want to implement a
I want to implement RadioButton and EditText inside a row of a ListView. I
I want to implement a sliding draw in my ListActivity. The original problem was
In My app i have implement the ListView . Now i want it to
I want to implement functionality where a listview loads a set number of views,
I want to implement ListView.OnScrollListener on the listview used in the spinner dialog. However
I want to implement a listview in android where I want to provide the
I'm trying to implement a custom ArrayAdapter for a ListView. The ArrayList I want
I want to implement a listview with section headers similar to the one found

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.