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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:47:10+00:00 2026-05-30T08:47:10+00:00

I have a customized ListView like this: List<Journal_Database> values = localDatabase.getAllJournalNames(); ListView journalNames =

  • 0

I have a customized ListView like this:

List<Journal_Database> values = localDatabase.getAllJournalNames();
ListView journalNames = (ListView)findViewById(R.id.JournalList);
journalNames.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
journalNames.setAdapter(new ArrayAdapter<Journal_Database>(
            this,R.layout.journal_name_list_black_text,R.id.list_content, values));

How could I set the CHOICE_MODE_MULTIPLE ?

I tried this:

 journalNames.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

But nothing happens.

EDIT :

I have found the solution, you can copy the choice_mode_multiple.xml file from the SDK folder to your project and change it.

I have this now:

<?xml version="1.0" encoding="utf-8"?>

<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:textColor="#000000"
android:textSize="15dp"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
android:paddingLeft="6dip"
android:paddingRight="6dip"
/>

And in the java code:

List<Journal_Database> values = localDatabase.getAllJournalNames();
    ListView journalNames = (ListView)findViewById(R.id.JournalList);
    journalNames.setAdapter(new ArrayAdapter<Journal_Database>(
            this,R.layout.simple_list_item_multiple_choice,android.R.id.text1, values));
    journalNames.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

Thank You

  • 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-30T08:47:11+00:00Added an answer on May 30, 2026 at 8:47 am

    Look at this link.it may be Helpfull… http://www.vogella.de/articles/AndroidListView/article.html

    Some Example like this…

    public class MyList extends ListActivity {
    
    
    /** Called when the activity is first created. */
    
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        // Create an array of Strings, that will be put to our ListActivity
        String[] names = new String[] { "Linux", "Windows7", "Eclipse", "Suse",
                "Ubuntu", "Solaris", "Android", "iPhone", "Linux", "Windows7",
                "Eclipse", "Suse", "Ubuntu", "Solaris", "Android", "iPhone" };
        setListAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_multiple_choice,
                android.R.id.text1, names));
        ListView listView = getListView();
        listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
    }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one customized list MyList that extends ArrayList, like this: class MyList extends
I have a customized BaseAdapter for my listView with this code: public View getView(int
I have a customized ListView that each row of the list is composed by
I have an application that has a list of buttons and has customized tooltips.
I have an activity, where the ListView holds customized linear layout elements for each
I have a ListView that uses a customized adapter, but I can't click on
I have used a customized list view in which i have added 4 TextView
I have a ListView with a customized filter and a customized sort Comparator. Both
I came across this application, that appeared to have customized the UI Picker. I
I have a listview which is customized to display an image and 2 textview.

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.