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

  • Home
  • SEARCH
  • 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 6712653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:17:05+00:00 2026-05-26T08:17:05+00:00

In My application i am using two list view’s in one activity, one for

  • 0

In My application i am using two list view’s in one activity, one for only items and one list view i am have add check box in every row.
My requirement is in below list view if item is checked i have to display on text view in the main activity if not have to display another activity .

i was not used ListActivity for this i just created from Activity

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout   xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout 
    android:orientation="vertical"
    android:layout_weight="0.5"
    android:layout_width="fill_parent"
    android:layout_height="60px">                
    <ListView 
        android:id="@+id/list1"
        android:layout_width="fill_parent"
        android:layout_weight="0.5"
        android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout 
    android:orientation="vertical"
    android:layout_weight="0.5"
    android:layout_width="fill_parent"
    android:layout_height="60px">

    <ListView android:id="@+id/list2"
        android:layout_width="fill_parent"
        android:layout_weight="0.5"
        android:layout_height="wrap_content" />
</LinearLayout>    

above list view for only items for below list view i have to add check box. how can i achieve this.

my activity is..

public  class Settings extends Activity   {    
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.settings); 

   ListView list1 = (ListView) findViewById(R.id.list1);
   ListView list2 = (ListView) findViewById(R.id.list2);

   list2.setAdapter(new ArrayAdapter(this,      
     android.R.layout.simple_expandable_list_item_1, Display));

   list2.setTextFilterEnabled(true);
   list2.setOnItemClickListener(new OnItemClickListener() {
      public void onItemClick(AdapterView<?> parent, View v,int position, long id) {

      }
 });    
   list1.setAdapter(new ArrayAdapter(this, android.R.layout.simple_expandable_list_item_1, Categories));

   list1.setTextFilterEnabled(true);
   list1.setOnItemClickListener(new OnItemClickListener() {
      public void onItemClick(AdapterView<?> parent, View v,int position, long id) {

      }
 });                
}
    static final String[] Categories = new String[] {
    "Alarm1","Alarm2","Alarm3","Alarm4","Alarm5"
    };
    static final String[] Display = new String[] {
    "24 Hours","Display Seconds"
    };   
 }
  • 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-05-26T08:17:05+00:00Added an answer on May 26, 2026 at 8:17 am
    @Override
            public View getView(int position, View convertView, ViewGroup parent) {
                if (convertView == null)
                    convertView = mInflater.inflate(R.layout.provider, null);
                TextView location = (TextView) convertView
                        .findViewById(R.id.description);
                checkBoxImage = (ImageView) convertView.findViewById(R.id.check_id);
                Provider p = (Provider) getItem(position);
                location.setText(p.Description + " - " + p.Location);
                return convertView;
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one asp.net web application. It is using two membership provider. Two sign-in
I have an application in which I'm currently using a two column table in
I have a Panorama Application, where one of the panorama items is 'Favorites'. I
I've been using Android for only a little while. In my application, I have
I am creating an android application in which there are two activites. One activity
I am building a web application using ASP.NET MVC that has two very distinct
I'm developing a Java application using Eclipse. My project has two source directories that
I'm slowly building my application to a working state. I'm using two functions called
I am developing the chatting application but by using that application two persons are
I have been experimenting with sending messages from two .NET Windows Forms applications using

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.