具有 9 个补丁角图像的完全透明的活动 [英] Fully transparent activity with 9 patch corner image
本文介绍了具有 9 个补丁角图像的完全透明的活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的活动中,我尝试使其透明并使用 9 个补丁角设计,但它仍然在那里的角落显示黑色,有人知道如何摆脱它吗?
我在这里尝试做的是非透明(正常)Activity A 启动一个新的透明活动 B 如下图所示,但是带有角设计的 9patch 背景不完全透明.
这是我的 9patch
活动 XML
<线性布局android:layout_width="fill_parent"android:layout_height="fill_parent"机器人:方向=垂直"机器人:isScrollContainer =真"机器人:滚动条=垂直"android:padding="12dip" >[…………]
清单
</活动>
风格
解决方案
use >
而不是你的.
In my activity I try to make it transparent and with a 9 patch corner design , but it still showing a black color at the corner there, anyone know how to get rid of it ?
What I try to do here is Non transparent (normal) Activity A with start a new transparent activity B as shown as below image but the 9patch background with corner design not fully transparent.
Here's my 9patch
Activity XML
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="#00000000"
android:fadingEdge ="horizontal"
android:dividerHeight="0dp"
android:background="@drawable/orange9patch">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:isScrollContainer="true"
android:scrollbars="vertical"
android:padding="12dip" >
[...........]
Manifest
<activity android:name=".ui.ResultActivity"
android:theme="@style/Theme.Transparent">
</activity>
Style
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Transparent" parent="android:Theme">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
[..........]
解决方案
use <style name="Theme.Transparent" parent="android:style/Theme.Translucent">
instead of yours.
这篇关于具有 9 个补丁角图像的完全透明的活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文