E-Commerce App Design in Android Example
Hello every one, this tutorial we will use all E-Commerce App Design in android. The E-Commerce shopping app design template source well be the most beautiful design template ever. Its category leading mobile portrait or landscape is perfect for showing off products, with easy product showing or details, buying. E-Commerce Shopping app is your personal online shopping for shoes, electronics, gadgets, home & kitchen ordering food and more. In this app many advantages for you like, Easily access for all product, search using filter like price, color, style, brand and many more.
1. HomeActivity
package com.tutorialsee.ecommer;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.ListView;
import android.widget.Toast;
import com.daimajia.slider.library.SliderTypes.BaseSliderView;
import com.daimajia.slider.library.SliderTypes.TextSliderView;
import java.util.ArrayList;
import java.util.HashMap;
public class HomeActivity extends AppCompatActivity implements BaseSliderView.OnSliderClickListener {
SliderLayout mDemoSlider;
private ListView list;
private ArrayList<Beanclasses> Bean;
private ListbaseAdapter baseAdapter;
private int[] IMAGE = {R.drawable.slidertea, R.drawable.slider2, R.drawable.slider3,};
private String[] TITLE = {"Great Deal", "Great Deal", "Great Deal"};
private String[] SUBTITLE = {"Grab it!", "Grab it!", "Grab it!"};
private String[] SHOP = {"Shop Now", "Shop Now", "Shop Now"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.homeactivity);
list = (ListView)findViewById(R.id.list);
//*****listview*******
Bean = new ArrayList<Beanclasses>();
for (int i= 0; i< TITLE.length; i++){
Beanclasses bean = new Beanclasses(IMAGE[i], TITLE[i], SUBTITLE[i], SHOP[i]);
Bean.add(bean);
}
baseAdapter = new ListbaseAdapter(HomeActivity.this, Bean) {
};
list.setAdapter(baseAdapter);
//******slider***********
mDemoSlider = (SliderLayout)findViewById(R.id.slider);
HashMap<String,Integer> file_maps = new HashMap<String, Integer>();
file_maps.put("1", R.drawable.s1);
file_maps.put("2",R.drawable.s2);
file_maps.put("3",R.drawable.s3);
for(String name : file_maps.keySet()){
TextSliderView textSliderView = new TextSliderView(this);
// initialize a SliderLayout
textSliderView
// .description(name)
.image(file_maps.get(name))
.setScaleType(BaseSliderView.ScaleType.CenterCrop)
.setOnSliderClickListener(this);
textSliderView.bundle(new Bundle());
textSliderView.getBundle().putString("extra", name);
mDemoSlider.addSlider(textSliderView);
}
mDemoSlider.setPresetTransformer(SliderLayout.Transformer.Default);
mDemoSlider.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
mDemoSlider.setCustomAnimation(new ChildAnimationExample());
mDemoSlider.setDuration(4000);
mDemoSlider.addOnPageChangeListener(this);
}
@Override
public void onSliderClick(BaseSliderView slider) {
}
}
2. homeactivity
<?xml version="1.0" encoding="utf-8"?>
<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"
xmlns:custom="http://schemas.android.com/apk/res-auto">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.tutorialsee.ecommer.SliderLayout
android:id="@+id/slider"
android:layout_width="match_parent"
custom:pager_animation_span="1100"
android:layout_height="270dp"
style="@style/AlertDialog.AppCompat"
android:background="#fff"/>
<com.tutorialsee.ecommer.ExpandableHeightListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.tutorialsee.ecommer.ExpandableHeightListView>
</LinearLayout>
<include
android:id="@+id/toolbar"
layout="@layout/toolbar">
</include>
</FrameLayout>
</ScrollView>
</RelativeLayout>
Comments
ABHISHEK NAIR
Sat, 03/21/2020 - 09:03
Permalink
Nice
Itas interesting
tutorialsee
Mon, 04/27/2020 - 19:20
Permalink
thanks