xml - I want the android screens like this the upper trapeziam shape and the picture should be changed dynamically -


enter image description here`

<!-- colored rectangle--> <item>     <shape android:shape="rectangle">         <size             android:width="100dp"             android:height="50dp" />         <solid android:color="#fad55c" />     </shape> </item>    <!-- these rectangles right side -->   <item     android:top="63dp"     android:bottom="-40dp"     android:right="-25dp">     <rotate         android:fromdegrees="-42">         <shape android:shape="rectangle">             <solid android:color="#ffffff" />         </shape>     </rotate> </item> 

`enter image description here

i want make trapezium shown @ upper half please me in making screen greatfull

if want vector drawable: trapezium.xml

<vector android:height="24dp" android:viewportheight="300.0" android:viewportwidth="480.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillcolor="#e03825" android:pathdata="m-18.93,275.26l505.01,-264.25l145.36,277.8l-505.01,264.25z"/> <path android:fillcolor="#ff000000"     android:pathdata="m-33.8,289.15l493,3.68"     android:strokecolor="#000000" android:strokewidth="14"/> 

edit

then can put in front of imageview

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context="com.example.lcimi.myapplication.mainactivity">     <imageview         android:layout_width="match_parent"         android:src="@drawable/back"/>     <imageview         android:layout_width="match_parent"         android:src="@drawable/trapezium"         android:layout_margintop="15dp"         android:scaletype="fitxy"         android:id="@+id/front"         android:layout_height="300dp" />  </relativelayout> 

to somthing http://imgur.com/a/cmfon


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -