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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:04:29+00:00 2026-06-04T06:04:29+00:00

I have a layout similar to the ICS Gmail app for tablets ( ListFragment

  • 0

I have a layout similar to the ICS Gmail app for tablets (ListFragment on the left and content on the right) and I was wondering how I could go about constructing the layouts such that there is a shadow separator between the two fragments (like in the Gmail app, shown below)

.Just look at that beautiful shadow!

Also, as this is applicable to this question, how can I have that nice triangle/arrow marker in the active list item’s layout? I assume to implement this, the ListView itself must lie above the shadow “layer”, but I have no idea how to create that.

  • 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-04T06:04:30+00:00Added an answer on June 4, 2026 at 6:04 am

    Just to let everyone know (because there seems to be a lack of information out there on this topic), this is achieved within the background selector XML of the individual list rows’ view. For example, this is the main screen’s layout,

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/list_row"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:background="@drawable/list_item_selector">
    
        ...<!-- Rest of layout goes here -->
    
    </RelativeLayout>
    

    But the magic comes in the list_item_selector:

    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_pressed="true" android:drawable="@drawable/list_pressed" />
        <item android:state_activated="true" android:drawable="@drawable/list_arrow_activated"  />
        <item android:drawable="@drawable/list_default" />
    </selector>
    

    By defining these as 9-patch drawables like this, you can have each list item contribute it’s width worth of shadow to that line in the middle, and when it is activated, that segment of shadow will be replaced by an arrow. I hope this helps someone, as it’s sure helped me!

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

Sidebar

Related Questions

In my app I have a GridView with many images (~100), layout similar to
I have a Cocoa app with a similar layout like Mail.app: A source list
I have an XML layout similar to this (the XML and code is a
I have multiple similar sites (same layout, just different data), and each of them
I would like to have a layout similar as this one and also to
In my application, I have a layout similar to what is shown below: @@@@@@@
I try to have a similar layout during editing as well debugging. When running
I want to have layout, which is similar by structure to Thunderbird classic view
I have 2 tables with similar layout, involving INCOME and EXPENSES. The id column
I have an application which has a layout similar to iTunes. The main window

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.