本次同样是将apidemo中得两个demo合并起来学习:Translucent and Translucent Blur
Translucent 展示的是对activity透明的处理
Translucent Blur不同之处是activity后面的信息会模糊化处理
1、Translucent 的处理主要是style和Theme来实现
//manifest中定义activity的主题
<activity android:name=".app.activity.TranslucentActivity"
android:label="@string/app_activity_translucent_lable"
android:theme="@style/Theme.Translucent">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.angie.apidemos.SAMPLE_CODE" />
</intent-filter>
</activity>
//values style中定义主题
<style name="Theme.Translucent" parent="android:style/Theme.Translucent">
<item name="android:windowBackground">@drawable/translucent_background</item>
<item name="android:windowNoTitle">true</item>
<item name="android:colorForeground">#fff</item>
</style>
//主题引用的背景在values color中定义
<drawable name="translucent_background">#a0000000</drawable>
#a0控制透明度
2、Translucent Blur的处理和Translucent的区别在于 onCreate方法中设置了flag
getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
上图:
Translucent
Translucent Blur
- 大小: 75.1 KB
- 大小: 82.9 KB
分享到:
相关推荐
[Android 毕业设计-课程设计] 美图与开发资讯 App -看妹纸与开发资讯.zip # 一个看妹纸与开发资讯的Android APP,具有自动缓存、清理缓存、分享、搜索与添加收藏的功能,使用Android Architecture Components构建的...
Pull Back Layout Pull down to finish an ...Make your Activity translucent by adding these two lines to your theme: <!-- ... --> @android:color/transparent true <!-- also transluce
Translucent Image brings iOS/MacOS/Fluent-design beautiful translucent UI to your game at minimal performance cost, making it the perfect choice for performance & power critical platform like mobile ...
快速开始VirtualApp 使用了 @hide API, 因此你必须使用我们的 android.jar 来替换你已有的那个 (Android-SDK/platforms/android-23/{android.jar}).在你的 AndroidManifest.xml 添加如下代码: android:name=...
模糊背景,制作漂亮的UI,亲测可用
@android:style/Theme.Translucent @android:style/Theme.Translucent.NoTitleBar @android:style/Theme.Translucent.NoTitleBar.Fullscreen 只需要在Manifest中需要透明的Activity内设置theme为以上任意一个就可以...
Android 4.4 (KitKat) introduced translucent system UI styling for status bar, then Android 5.0 offers simple ways to enable translucency in Activity( android:windowTranslucentStatus) and tint color ...
Translucent Image - Fast UI Background Blur v3.16.0.unitypackage
在Android上删除Modal的StatusBar背景 之前 后 用法 npm install react-native-modal-translucent --save # or yarn add react-native-modal-translucent 如果您的RN版本低于0.60,则需要手动链接。 react-native ...
此外API Demo中提供了另一个实例,不用继承内置的Theme,可以自己完全创建一个新的style,实现透明效果,同时可以加一些其他特效,比如模糊化等,但我试了半天也没有搞定,完全复制代码,也没有出现这个效果,这个...
Translucent Image(High performance Blur behind UI 2.2).unitypackage
meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <title>jQuery红包泡泡点击抽奖代码 </title> <link href="css/main.css?3.1.64" rel="stylesheet"> &...
A library managing nested Fragment, translucent StatusBar and Toolbar for Android. You could use it as a single Activity Architecture Component. This is also the subproject of react-native-...
-- icons and icons and icons and icons and icons --> <?php echo favicons(); ?> <!-- crayons and paint --> <?php echo add_css(array('bootstrap', '...
2.1.1 版本,最新版本支持urp的UI效果,背景模糊,高斯模糊,如果作者出了更新的版本,也可联系我下载
这个扩展要求每个座位一个许可证 需要Unity 5.5.0或更高版本。 半透明的图像为你的游戏带来了iOS/MacOS/ fluo设计的美丽的半透明UI,以最小的性能成本,使它成为性能和电量关键平台如手机的完美选择 ...
React导航可折叠 react-navigation的扩展,使标题可折叠。 在上试用演示 兼容性 :construction: :pushpin: 在v5.7.0所有内容都已.../* Call this If you have disabled Expo's default translucent statusBar. */
一款小巧的windows系统美化程序,可以将任务栏变为透明,然后就能更好的欣赏你的壁纸啦,可执行文件在Debug目录中
不知道什么叫做"沉浸式状态栏"、"translucent status bar"、"translucent system bar" 在5.0以下解放状态栏的App其实并不多,例如ES文件管理器、豌豆荚、最美应用 这三个就是完全的典型了,可以看到ES状态栏还是...
一款win10的插件,可以将win10下方任务栏根据喜好调节透明程度,也可以通过应用商店进行下载。下载后直接进行安装,在Regular中可以对任务栏的透明度进行选择。