Android的透明的TextView? [英] Android Transparent TextView?
本文介绍了Android的透明的TextView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
简单地说,如何使一个TextView透明?(不完全透明)
Simply, how to make a TextView transparent? (Not full transparency)
我搜索的文档和StackNetwork,但没有找到它? 我想有这样的事情。
I searched the docs and the StackNetwork and couldn't find it? I guess there is something like this.
感谢。
更新
这是XML code:
This is the XML code:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal"
android:orientation="vertical"
android:background="@drawable/background">
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/header"
android:src="@drawable/logo1"
/>
<ListView android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:paddingRight="5dp"
android:scrollbarStyle="outsideOverlay"
android:cacheColorHint="#00000000" />
<TextView
android:id="@+id/footer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="25sp"
android:singleLine="true"
android:background="#07000000"
android:textColor="#FFFFFF"
android:text="rrrrr" />
</LinearLayout>
我想在页脚 的TextView
是透明的使ListView的项目可以滚动时可见
推荐答案
请尝试这块code ..
Please try this piece of code..
<TextView
android:id="@+id/txtview1"
android:layout_width="wrap_content"
android:background="@drawable/bg_task"
android:layout_height="wrap_content"
android:textSize="14sp"
android:singleLine="true"
android:textColor="#FFFFFF" />
用于背景图片为透明的,这样可以解决了。
Used background image as transparent so may be solved that.
或
android:background="#07000000"
或
请尝试以下...
<?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:gravity="center_horizontal" android:orientation="vertical"
android:background="@drawable/main_bg">
<ImageView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="@+id/header"
android:src="@drawable/btn_complete" />
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@+id/list" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_weight="1"
android:paddingRight="5dp" android:scrollbarStyle="outsideOverlay"
android:cacheColorHint="#00000000" />
<TextView android:id="@+id/footer" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textSize="25sp"
android:singleLine="true" android:background="#07000000"
android:textColor="#FFFFFF" android:text="rrrrr"
android:layout_centerInParent="true"
android:layout_alignParentBottom="true" />
</RelativeLayout>
</LinearLayout>
这篇关于Android的透明的TextView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文