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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:55:05+00:00 2026-06-08T17:55:05+00:00

i included some linearlayouts in a linear layout. But i want the linear layout

  • 0

i included some linearlayouts in a linear layout. But i want the linear layout on top (the included one) to be greyish, and just the background orange. When i try this, everything is orange! Is there some way i can prevent this?

my ll:

  <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" 
    android:background="@color/orange">

     <include
            android:id="@+id/bt_overview_list_places"
            layout="@layout/single_overview_item" 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"/>
      <include
            android:id="@+id/bt_overview_list_agenda"
            layout="@layout/single_overview_item" 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"/>
       <include
            android:id="@+id/bt_overview_list_shopping"
            layout="@layout/single_overview_item" 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"/>
        <include
            android:id="@+id/bt_overview_list_food"
            layout="@layout/single_overview_item" 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"/>


</LinearLayout>

the one i include:

    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/lloverview"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical"
  android:background="@color/custom_button_grey"
  >
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="horizontal"
  >
  <ImageView
      android:id="@+id/ivoverviewimage"
      android:layout_width="50dp"
      android:layout_height="50dp" android:src="@drawable/ic_launcher" android:scaleType="centerCrop"
      android:layout_margin="10dp"
      android:layout_weight="1"/>

  <LinearLayout
      android:layout_width="225dp"
      android:layout_height="wrap_content"
      android:orientation="vertical" >

  <TextView
      android:id="@+id/tvoverviewname"
      android:layout_width="225dp"
      android:layout_height="wrap_content"
      android:layout_gravity="left|top"
      android:layout_marginLeft="10dip"
      android:text="naam"
      android:textSize="16dip" 
      android:maxLines="1"
      android:ellipsize="marquee"
      android:textColor="@color/black"/>

 <TextView
     android:id="@+id/tvoverviewtext"
     android:layout_width="225dp"
     android:layout_height="wrap_content"
     android:layout_marginLeft="10dip"
     android:maxLines="3"
     android:text="tip"
     android:textSize="12dip" 
     android:ellipsize="end"
     android:textColor="@color/black"/>

 </LinearLayout>



 <ImageView 
     android:id="@+id/arrow"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_weight="1"
      android:src="@drawable/iconarrowsmall"
      android:layout_gravity="center_vertical"
      android:layout_margin="2dip"
     />

</LinearLayout>
<ImageView 
     android:id="@+id/bottom_border"
     android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:src="@drawable/custombuttonlist_bottomborder"
     />

</LinearLayout>

I already tried giving the linear layouts colors programmatically:

lPlaces= (LinearLayout)findViewById(R.id.bt_overview_list_places);
llPlaces.setBackgroundColor(R.color.custom_button_grey);

but everything just stays orange (with some difference in color).

I checked my color, and i think it should be 100% NOT transparent:

<color name="custom_button_grey_text">#585850</color>

even with the FF added in front of it:

 <color name="custom_button_grey_text">#FF585850</color>
  • 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-08T17:55:07+00:00Added an answer on June 8, 2026 at 5:55 pm

    Ok i get it:

    i created an drawable file:

    <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android">
         <!-- focused -->
        <item android:state_focused="true" android:drawable="@color/list_even" />
        <!-- focused and pressed-->
        <item android:state_focused="true" android:state_pressed="true" android:drawable="@color/list_even" />
        <!-- pressed -->
        <item android:state_pressed="true" android:drawable="@color/list_even" />
        <!-- default -->
        <item android:drawable="@color/list_odd" /> 
    </selector>
    

    (now i have nice colorchange when i press it too)
    and set that as background resource:

    llPlaces.setBackgroundResource(R.drawable.overview_background_color_even);

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

Sidebar

Related Questions

I'm having some problems with this piece of code. I've included a class declaration
Let's say I do this: $(#content).load(...); Within what I'm loading some javascript is included:
I've overridden the views-view.list.tpl.php. I want to optionally included some extra HTML markup if
I try to unify my layouts and so i want to reuse some UI
I included some adsense code in my google chrome extension popup file. Unfortunately this
I'm trying to dynamically create some CheckBoxes in one of my Android activities, but
I asked a similar question yesterday but I included some code that basically took
Assume that there's no problem with my header file and some included library. I'm
What are some key bindings that aren't included?
My program uses some external programs that i included in the Files folder. In

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.