Closed mianaliasjad closed 5 years ago
Try specifying shimmer_colored="true"
shimmer_colored
makes my imageView white.
Plus shimmer_colored = true
applies to the first parent in the complex view hierarchy. All the children are gone now.
Shimmer.ColorHighlightBuilder().setBaseAlpha(0.5f).setHighlightColor(0xffffffff.toInt())
This works for me.
Shimmer.ColorHighlightBuilder().setBaseAlpha(0.5f).setHighlightColor(0xffffffff.toInt())
This works for me.
Doesnt work, makes the child white
Shimmer.ColorHighlightBuilder colorHighlightBuilder = new Shimmer.ColorHighlightBuilder();
colorHighlightBuilder.setHighlightColor(getResources().getColor(R.color.colorWhite));
colorHighlightBuilder.setHighlightAlpha(0.3f);
colorHighlightBuilder.setRepeatCount(0);
colorHighlightBuilder.setBaseAlpha(0);
shimmerContainer.setShimmer(colorHighlightBuilder.build())
shimmerContainer.startShimmer();
<FrameLayout
android:id="@+id/actionRoot"
android:background="@drawable/bg_round_button_green"
android:layout_margin="8dp"
android:layout_width="match_parent"
android:layout_height="48dp" >
<TextView
android:textColor="@color/white"
android:id="@+id/action"
android:gravity="center"
android:textSize="16dp"
android:text="CHARGE $ 232.23"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.facebook.shimmer.ShimmerFrameLayout
android:id="@+id/shimmerContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:background="#000"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</com.facebook.shimmer.ShimmerFrameLayout>
</FrameLayout>
Nice na! :)
Mistake i was doing was
<com.facebook.shimmer.ShimmerFrameLayout
android:id="@+id/shimmerContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:textColor="@color/white"
android:id="@+id/action"
android:gravity="center"
android:textSize="16dp"
android:text="CHARGE $ 232.23"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.facebook.shimmer.ShimmerFrameLayout>
i have imageview insdie shimmer Frame i want to just white shimmer over it i have tried so many ways but can't achieve anything i just want white shimmer over my image view currently i am doing this but nothing happening i started it pragmatically