Fully transparent activity with 9 patch corner image

倖福魔咒の 提交于 2019-12-21 21:57:59

问题


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>
[..........]

回答1:


use <style name="Theme.Transparent" parent="android:style/Theme.Translucent">

instead of yours.



来源:https://stackoverflow.com/questions/7695834/fully-transparent-activity-with-9-patch-corner-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!