<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    xmlns:tools="http://schemas.android." />

<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    xmlns:tools="http://schemas.android." />

info@thistimebd.com

Thursday 21st of November 10:15:09pm

gradient background

activity_main.xml

===================


<?xml version="1.0" encoding="utf-8"?>

<android.support.constraint.ConstraintLayout 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="match_parent"

    android:layout_height="match_parent"

    android:orientation="vertical"

    android:background="@drawable/bacground_gradient"

    tools:context="com.sam.web.gradientbackground.MainActivity">


 <ListView

     android:dividerHeight="2dp"

     android:divider="#22ffed"

     android:id="@+id/listViewId"

     android:layout_width="match_parent"

     android:layout_height="match_parent"></ListView>


</android.support.constraint.ConstraintLayout>

=========================================================================================

background_gradient.xml

=======================



<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >

    <gradient

        android:type="linear"

        android:startColor="#FF008000"

        android:endColor="#FF00ffff"

        android:angle="45"/>

</shape>