Reputation: 13
I have created an activity following some tutorials on SO.Activity is transparent with respect to the background color of another activity but it is not showing transparency with the text contained by the background activity.
XML:
<?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="match_parent"
android:background="@color/ApplicationForeground"
android:gravity="center_vertical"
android:orientation="vertical" >
ApplicationForeground is blue which I set purposefully.
layoutrater is also not showing any text contained by background activity.
<LinearLayout
android:id="@+id/layoutRater"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:alpha="1"
android:background="@color/opakkblackeighty"
android:gravity="center"
android:orientation="horizontal"
>
opakkblackeighty is set #40000000.
This textview should show its context and the text contained by background activity.
<TextView
android:id="@+id/downVote"
android:layout_width="100sp"
android:layout_height="100sp"
android:layout_marginLeft="5sp"
android:layout_marginRight="5dp"
android:layout_marginTop="5sp"
android:background="@color/opakkblackeighty"
android:gravity="center"
android:src="@drawable/downvote"
android:text="-"
android:textColor="@color/ApplicationForeground"
android:textSize="50sp" />
</LinearLayout>
<TextView
android:id="@+id/totalVoting"
android:layout_width="fill_parent"
android:layout_height="30dp"
android:background="@color/opakkblackeighty"
android:gravity="center"
android:text="0"
android:textColor="@android:color/holo_green_light"
android:textSize="20sp" />
</LinearLayout>
Upvotes: 0
Views: 70
Reputation: 88
The linearlayout is filling parent, so you dont see the activity background.
Upvotes: 1