Skip to main content

card View

 Tutorial membuat card view makanan


hia disini saya akan mengajarkan mengenai card view beserta dengan scrollview , disini saya menyediakan codingan berserta hasil result nya


CODINGAN : 

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

<LinearLayout 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"

    tools:context=".MainActivity"

    android:background="@color/cardview_light_background">


    <ScrollView

        android:layout_width="match_parent"

        android:layout_height="600dp"

        android:layout_margin="10dp"

        app:layout_constraintTop_toTopOf="parent">



    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:orientation="vertical">



        <TextView

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:paddingTop="20dp"

            android:paddingBottom="35dp"

            android:textColor="#FFFFFF"

            android:text="Syaid Alfarishi"

            android:background="#770DE1"

            android:textStyle="bold"

            android:textAlignment="center"

            android:textSize="25dp"

            />



<android.support.v7.widget.CardView

    android:layout_width="match_parent"

    android:layout_height="wrap_content"

    app:cardCornerRadius="10dp"

    app:cardElevation="20dp"

    android:layout_marginTop="10dp"

    android:layout_marginLeft="10dp"

    android:layout_marginRight="10dp"

    android:layout_marginBottom="30dp">


    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:orientation="vertical">



    <TextView

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:text="About Kami"

        android:textStyle="bold"

        android:textSize="25dp"

        android:padding="10dp"/>


    <TextView

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:padding="10dp"

        android:text="kami menyediakan banyak produk yang sangat menarik yang dapat anda lihatr"

        android:textSize="25dp" />


    </LinearLayout>


<!--    ==========================-->


    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:paddingTop="160dp"

        android:paddingLeft="30dp"

        android:orientation="horizontal">


        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="share"

            android:textSize="25dp" />


        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:textColor="@color/teal_200"

            android:text="Learn More"


            android:textSize="25dp"

            android:paddingLeft="10dp"/>

    </LinearLayout>

    </android.support.v7.widget.CardView>


<android.support.v7.widget.CardView

    android:layout_width="match_parent"

    android:layout_height="wrap_content"

    app:cardCornerRadius="10dp"

    app:cardElevation="20dp"

    android:layout_marginLeft="10dp"

    android:layout_marginRight="10dp"

    android:layout_marginBottom="30dp">

    <ImageView

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:scaleType="center"

        android:src="@drawable/nasi"/>





<!--    ==========================-->


    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:paddingTop="160dp"

        android:paddingLeft="30dp"

        android:orientation="vertical">


        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="nasi padang"

            android:textSize="27dp" />


        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:textColor="#000"

            android:text="nasi padang adalah makanan khas yang berasal dari sumatra barat yang sangat terkenal baik di nusantara maupun di dunia"

            android:textSize="20dp"

            />

    </LinearLayout>


    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:paddingTop="300dp"

        android:paddingLeft="30dp"

        android:orientation="horizontal">


        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="share"

            android:textSize="25dp" />


        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:textColor="@color/teal_200"

            android:text="Learn More"


            android:textSize="25dp"

            android:paddingLeft="10dp"/>

    </LinearLayout>

    </android.support.v7.widget.CardView>


<android.support.v7.widget.CardView

    android:layout_width="match_parent"

    android:layout_height="wrap_content"

    app:cardCornerRadius="10dp"

    app:cardElevation="20dp"

    android:layout_marginLeft="10dp"

    android:layout_marginRight="10dp"

    android:layout_marginBottom="30dp" >


    <ImageView

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:scaleType="center"

        android:src="@drawable/satenormal"/>


<!--    ==========================-->


    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:paddingTop="160dp"

        android:paddingLeft="30dp"

        android:orientation="vertical">


        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="sate Madura"

            android:textSize="27dp" />


        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:textColor="#000"

            android:text="adalah sate yang sangat terkenal dan mendunia , sate madura terkenal di madura maupun di indonesia"

            android:textSize="20dp"  />

    </LinearLayout>


    <LinearLayout

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:paddingTop="300dp"

        android:paddingLeft="30dp"

        android:orientation="horizontal">


        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="share"

            android:textSize="25dp" />


        <TextView

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:textColor="@color/teal_200"

            android:text="Learn More"


            android:textSize="25dp"

            android:paddingLeft="10dp"/>

    </LinearLayout>

    </android.support.v7.widget.CardView>




    </LinearLayout>

    </ScrollView>

</LinearLayout>




HASIL : 











sekian sajalah hasil dari ugas projek yang saya buat


Syaid Alfarishi

XI RPL 2


Comments

Popular posts from this blog

Kuis 1 (Image view)

 Nama : Syaid Alfarishi Kelas : XI RPL 2 Codingan :  <?xml version="1.0" encoding="utf-8"?> <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="match_parent"     android:layout_height="match_parent"     tools:context=".MainActivity">     //Penempatan komponen     <TextView         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_marginBottom="10dp"         android:background="@color/purple_500"         android:padding="20dp"         android:text="bahasa pemrogramman"         android:textAlignment="center"         android:textAllC...

Review Tentang Android

 Android Perangkat Ponsel Cerdas / Smartphone Ponsel yang bertemu dengan internet yang kita ketahui sekarang ini dipelopori oleh BlackBerry diawal tahu 2000 dengna mengembangkan jaringan 3D telah merubah ponsel menjadi ponsel cerdas. Ponsel yang  memiliki kecerdasan ini dikenal juaga dengan istilah smartphone . Android Studio terus berkembang dan muncul dengan berbagai kecanggihan dan kelebihan. Android adalah sistem operasi berbasis linux dengan kode sumber terbuka dan berlisensi APACHE 2.0 yang dirancang beragam untuk perangkat bergerak layar sentuh seperti smartphone dan komputer tablet. sistem operasi ini dirilis secara resmi pada tahun 2007 yang bertujuan untuk memajukan standar terbuka perangkat seluler. Android diluncurkan dengan berbagai versi diantara nya yaitu lollipop, kitkat, oreo, pie dan masih banyak lagi. Software yang dapat digunakan yaitu seperti netbeans, ellipce, android studio, apache cardova yang tentunya memiliki kelebihannya masing masing. Android Studio...