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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:05:02+00:00 2026-06-05T05:05:02+00:00

I have PreferenceActivity with some sample content: <?xml version=1.0 encoding=utf-8?> <PreferenceScreen xmlns:android=http://schemas.android.com/apk/res/android> <PreferenceCategory android:title=First

  • 0

I have PreferenceActivity with some sample content:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
        <PreferenceCategory
                android:title="First Category"
                android:key="first_category">
                <CheckBoxPreference
                        android:key="perform_updates"
                        android:summary="Enable or disable data updates"
                        android:title="Enable updates"
                        android:defaultValue="true"
                        />
                <ListPreference
                        android:key="updates_interval"
                        android:title="Updates interval"
                        android:summary="Define how often updates will be performed"
                        android:defaultValue="1000"
                        android:entries="@array/updateInterval"
                        android:entryValues="@array/updateIntervalValues"
                        android:dependency="perform_updates"
                        />
        </PreferenceCategory>

        <PreferenceCategory
                android:title="Second Category"
                android:key="second_category">
                <EditTextPreference
                        android:key="welcome_message"
                        android:title="Welcome Message"
                        android:summary="Define the Welcome message to be shown"
                        android:dialogTitle="Welcome Message"
                        android:dialogMessage="Provide a message"
                        android:defaultValue="Default welcome message"/>
        </PreferenceCategory>
</PreferenceScreen>

As all of you know, it’s looking incredibly ugly in all Androids before 4.0. Now the idea is to create custom theme and apply it to the activity. I want to make the ListView look like on the picture below:

enter image description here

I can adjust the separators (“Personalizacja”, “Informacje[…]”) by overriding <item name="listSeparatorTextViewStyle">… but the real question is: how do I create such background with rounded corners for separate groups? I’m not able to find out any way to set custom style to first/last element in the group.

I’d be thankful for any ideas. But please note that I want to achieve it via styles & themes only.

btw. If you have an idea how to achieve the above, but without rounded corners – let me know too!

  • 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-05T05:05:03+00:00Added an answer on June 5, 2026 at 5:05 am

    I think the effect can be achieved for an android ListView. The main feature of the ListView is to recycle its row entries so that they don’t have to be instantiated for every list entry.

    The trick is to create multiple list element layouts and to swap them in in your ListAdapater. So you would basically have list entry for the group header, the group top element, the group middle elements and the group bottom element. All in all 4 different layout “templates” that your ViewHolder in your adapter should hold on to.

    The following image describes the different layout segments:

    enter image description here

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

Sidebar

Related Questions

I have a simple preference screen defined like this <PreferenceScreen xmlns:android=http://schemas.android.com/apk/res/android> <PreferenceCategory android:title=Security> <CheckBoxPreference
I read http://developer.android.com/reference/android/app/Activity.html but I have a question about PreferenceActivity lifecycle: Does a PreferenceActivity
I have created a PreferenceActivity based on xml for PreferenceScreen. In the xml you
I have 1 PreferenceActivity in preferences.xml is <CheckBoxPreference android:id=@+id/pushCB android:checked=true android:defaultValue=true android:key=PushService android:summary=Set to
i have a strange (?) error in my android application. I have defined some
I have used PreferenceActivity to have preference in my android application. I want one
I have been attempting to use an android.preference.DialogPreference inflated from XML, but the documentation
I have a PreferenceActivity that loads two Fragments via the xml file for the
I have a PreferenceActivity with a bunch of (Sub)PreferenceScreens. Each such (Sub)PreferenceScreen represents an
I'm using PreferenceActivity to set some preferences about another BroadcastReciever that i have. While

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.