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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:37:07+00:00 2026-06-04T10:37:07+00:00

i wish to show a listView on a PreferenceActivity similar to what the android

  • 0

i wish to show a listView on a PreferenceActivity similar to what the android OS wifi-settings has for the list of networks (example here , on the bottom area of the image) .
however , such a thing isn’t availabe , so i’ve created a new class that extends Preference , and what i returned in the onCreateView is just a ListView instance .

it worked , but the listView has a constant size of about a single item no matter what i do to its layoutParams and no matter what i do to the adapter . even if i set the adapter inside the onCreateView , it has the exact same size .

not only that , but the listView cannot be scrolled , even though it is clear that it has multiple items within it .

i would , of course, want to use the same text size standard as on all of the preferences , to give a native feeling.

can anyone please tell me what can be done in order to make it work well?

btw, the app should work for android API 10+ (minimum 10) .

  • 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-04T10:37:09+00:00Added an answer on June 4, 2026 at 10:37 am

    ok , the answer would be to use setContentView to whatever layout you wish (including any views you wish) , add there a listView for the preferences , and for this listView , call bind and setAdapter.

    i’ve found this solution by looking at other solutions, like this one:
    http://kmansoft.com/2011/08/29/implementing-long-clickable-preferences/

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

Sidebar

Related Questions

I have a list of objects in a model. I wish to show elements
I wish to create a ListView, where each item in the list should contain
I wish to create an application in Android which can show the trains(details like
I have a controller which has 3 functions. I wish to show 3 different
I am a newbie for iphone development, i wish to show some list of
I wish show presentation of wp7 application on PC monitor, how i can do
I wish to show/hide content on click, and am setting the CSS opacity rather
I wish to show a Article's content on a Joomla template 2.5 page. I
I wish HTML could do something semantically equivalent to this; <dl class=main-list> <definitionitem> <dt>Some
I wish to show the mouse coordinates only when I am viewing tabpage7. So

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.