zoukankan      html  css  js  c++  java
  • Android 实现透明效果的 Activity

    Android系统提供了将Activity设置为透明的主题:@android:style/Theme.Translucent

     

    该属性同一时候支持隐藏TitleBar和全屏显示。

    仅仅须要在AndroidManifest.xml配置文件里为相应的Activity添加该属性就可以。


    <activity
                android:name=".activities.MyActivity"
    
                android:theme="@android:style/Theme.Translucent.NoTitleBar" />


    假设希望实现半透明的效果,首先将Activity设置为透明。然后将Activity的布局文件的全局背景设置为半透的颜色值。


    <?xml version="1.0" encoding="utf-8"?

    > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:stepset="http://schemas.android.com/apk/res/******" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="#70000000"> </RelativeLayout>



  • 相关阅读:
    H5 WebSocket
    JS call()、apply()、bind()
    JS中this指向问题
    JS GET POST请求
    php 常用get post http请求
    php 开启redis
    egret接入华为快应用6004
    PHP生成公私钥,签名和验签
    JS数组去重
    Oracle第九课
  • 原文地址:https://www.cnblogs.com/clnchanpin/p/6753661.html
Copyright © 2011-2022 走看看