Created
September 25, 2015 18:27
-
-
Save msomu/dd8ae34751a73b304e28 to your computer and use it in GitHub Desktop.
A gist for showing textview on the Image view, this util is for giving grey background to the image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle" > | |
<gradient | |
android:angle="90" | |
android:endColor="@android:color/transparent" | |
android:startColor="@android:color/black" /> | |
<corners android:radius="0dp" /> | |
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FrameLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ImageView | |
android:id="@+id/image" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:fitsSystemWindows="true" | |
android:scaleType="centerCrop" | |
app:layout_collapseMode="parallax" /> | |
<View | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@drawable/actionbar_gradient_dark" /> | |
</FrameLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment