首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在闪光中添加3的库仑

如何在闪光中添加3的库仑
EN

Stack Overflow用户
提问于 2021-06-20 09:47:18
回答 1查看 346关注 0票数 1

你好,我试图在3的库仑中在图像视图上添加微光效果,但问题是,闪烁的效果只显示在一个库仑中,而不是在3个库仑中。

还有另一个问题,在我的物理设备中,即使设备规格非常好,闪烁效果看起来也是卡住的,但是在其他物理和模拟器上,模拟动画显示出烟雾和工作状态。

这里是一个截图

XML代码

Fragment_Profile.xml

代码语言:javascript
运行
复制
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/black"
    android:overScrollMode="never">


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:overScrollMode="never"
        android:paddingTop="20dp">

        <include
            android:id="@+id/snipet_profile"
            layout="@layout/snipet_profile" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/postRecyclerViewProfile"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:orientation="vertical"
            android:overScrollMode="never" />

        <com.facebook.shimmer.ShimmerFrameLayout
            android:id="@+id/shimmerEffect"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <include layout="@layout/post_item_container_shimmer" />

                <include layout="@layout/post_item_container_shimmer" />

                <include layout="@layout/post_item_container_shimmer" />

                <include layout="@layout/post_item_container_shimmer" />

                <include layout="@layout/post_item_container_shimmer" />

                <include layout="@layout/post_item_container_shimmer" />

                <include layout="@layout/post_item_container_shimmer" />

                <include layout="@layout/post_item_container_shimmer" />

                <include layout="@layout/post_item_container_shimmer" />

                <include layout="@layout/post_item_container_shimmer" />

            </LinearLayout>

        </com.facebook.shimmer.ShimmerFrameLayout>
    </LinearLayout>
</androidx.core.widget.NestedScrollView>

post_item_container_shimmer.xml

代码语言:javascript
运行
复制
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="1dp">


    <com.google.android.material.card.MaterialCardView
        android:layout_width="150dp"
        android:layout_height="150dp"
        android:layout_centerInParent="true"
        android:layout_marginStart="3dp"
        android:layout_marginTop="11dp"
        android:layout_marginEnd="3dp"
        app:cardElevation="1dp"
        app:cardMaxElevation="4dp"
        app:shapeAppearanceOverlay="@style/RoundedCorner"
        tools:ignore="ObsoleteLayoutParam">

        <com.google.android.material.imageview.ShapeableImageView
            android:id="@+id/imagePost"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:adjustViewBounds="true"
            android:background="#E7E7E7"
            android:contentDescription="@string/todo"
            app:shapeAppearanceOverlay="@style/RoundedCorner" />

    </com.google.android.material.card.MaterialCardView>
</RelativeLayout>
EN

回答 1

Stack Overflow用户

发布于 2022-11-06 06:33:28

我不知道会不会起作用,但我这样解决了我的问题:

代码语言:javascript
运行
复制
    <com.facebook.shimmer.ShimmerFrameLayout
        android:id="@+id/shimmer_product"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginHorizontal="10dp">

            <include layout="@post_item_container_shimmer.xml"/>
            <include layout="@post_item_container_shimmer.xml"/>
            <include layout="@post_item_container_shimmer.xml"/>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginHorizontal="10dp"
            android:layout_marginTop="180dp">

            <include layout="@post_item_container_shimmer.xml"/>
            <include layout="@post_item_container_shimmer.xml"/>
            <include layout="@post_item_container_shimmer.xml"/>

        </LinearLayout>

    </com.facebook.shimmer.ShimmerFrameLayout>

希望它能帮上忙。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68054590

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档