E-Commerce App Source Code (Part - 2)
Android Tutorials Point
The best Android Apps Source Code
Welcome Dear Viewers,
The best Android Apps Source Code is available at one place. So to make The best E-Commerce App just copy these codes into your App and Run any time. Literally I have explained each steps in this Tutorial.
This is Only page setup coding & next parts will be publishing soon here too.
I will show you their XML code and Java code for more clarification. So Lets start our Source Code.
Note: In Layouts we will use Placeholder instead of using actual images, because it will be fetch from server side panel that will be created soon. So don't be confuse😇 and follow all steps.
For Placeholder click the link below
Demo of the App
Screen Shot
Source Code (Part - 2)
Main Activity (Product Details Page)
<androidx.constraintlayout.widget.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"
tools:context=".activities.ProductDetailsActivity">
<ImageView
android:id="@+id/imageView2"
android:layout_width="395dp"
android:layout_height="246dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.466"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.011"
app:srcCompat="@drawable/ic_launcher_placehoder" />
<TextView
android:id="@+id/tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Product Details"
android:textStyle="bold"
android:textSize="30dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.045"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2"
app:layout_constraintVertical_bias="0.071" />
<Button
android:id="@+id/cart"
android:layout_width="374dp"
android:layout_height="48dp"
android:backgroundTint="#00FFFF"
android:text="Add to Cart"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.45"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2"
app:layout_constraintVertical_bias="0.893" />
</androidx.constraintlayout.widget.ConstraintLayout>
.........................................................
Item Categories (XLL File)
<androidx.constraintlayout.widget.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">
<ImageView
android:id="@+id/imageView"
android:layout_width="122dp"
android:layout_height="124dp"
android:background="@drawable/shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.264"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.077"
app:srcCompat="@drawable/ic_launcher_placehoder" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="44dp"
android:text="Name"
app:layout_constraintEnd_toEndOf="@+id/imageView"
app:layout_constraintStart_toStartOf="@+id/imageView"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
</androidx.constraintlayout.widget.ConstraintLayout>
..........................................................
All the Best 😇
Best Regards
Android Tutorials Point
To understand the tutorial step by step you have to be watch video from here.
Playlist of E-Commerce App YouTube Link.
https://www.youtube.com/playlist?list=PLLpZnoKq_Rexp5iX1rJXnqmWM-OelcmCg
Comments
Post a Comment