小编Sis*_*ghe的帖子

调暗/模糊父布局背景

这里有与上述主题相同的问题,但没有得到答案

我这里有一个布局

我需要在顶部布局中使用与底部布局相同的图像,但具有模糊样式

设置 alpha 没有帮助 - 文本视图也会影响

如何模糊向下布局的背景

此处为 XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" android:layout_height="match_parent"
    android:background="#ffffff">


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:weightSum="105"
        android:orientation="vertical">
/// top layout with  image 
        <LinearLayout
            android:background="@drawable/s"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="45">



        </LinearLayout>


        ////  other set of layouts that i want to add the same iamge but in blur style
        <LinearLayout
            android:alpha="220"

            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="60"
            android:weightSum="75"
            android:orientation="vertical">



            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="25">

<TextView
    android:id="@+id/brand_name"
    android:layout_marginTop="10dp"
    android:textSize="25dp"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="SHAKY ISLES"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true" />

                <ImageView
                    android:id="@+id/image_icon"
                    android:layout_width="20dp"
                    android:layout_height="20dp"
                    android:background="#000000"
                    android:layout_below="@+id/brand_name" …
Run Code Online (Sandbox Code Playgroud)

layout android blur

3
推荐指数
2
解决办法
4万
查看次数

获取Android原始文件夹中的所有文件

可以说我在原始文件夹中有100个.mp3文件

对于单个已知文件可以读取文件,可以使用getResources()。openRawResource(R.raw.myfilename)

但我想获取原始文件夹中的所有文件名,然后从该列表中随机选择一个

有什么帮助吗?

directory android android-mediaplayer

2
推荐指数
1
解决办法
2533
查看次数

标签 统计

android ×2

android-mediaplayer ×1

blur ×1

directory ×1

layout ×1