-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
103 additions
and
5 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
app/src/main/java/com/allandroidprojects/ecomsample/options/SearchAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.allandroidprojects.ecomsample.options; | ||
|
||
import android.content.Context; | ||
import android.support.v7.widget.RecyclerView; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
|
||
import com.allandroidprojects.ecomsample.R; | ||
|
||
|
||
|
||
public class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.Holderview>{ | ||
|
||
|
||
|
||
public SearchAdapter() | ||
{ | ||
|
||
} | ||
@Override | ||
public Holderview onCreateViewHolder(ViewGroup parent, int viewType) { | ||
View layout= LayoutInflater.from(parent.getContext()).inflate(R.layout.customitem,parent,false); | ||
|
||
return new Holderview(layout); | ||
} | ||
|
||
@Override | ||
public void onBindViewHolder(Holderview holder, final int position) { | ||
|
||
|
||
} | ||
|
||
@Override | ||
public int getItemCount() { | ||
return 1; | ||
} | ||
|
||
|
||
|
||
class Holderview extends RecyclerView.ViewHolder | ||
{ | ||
|
||
Holderview(View itemview) | ||
{ | ||
super(itemview); | ||
|
||
|
||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.v7.widget.CardView xmlns:android="https://schemas.android.com/apk/res/android" | ||
xmlns:app="https://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
app:cardCornerRadius="10dp" | ||
app:cardUseCompatPadding="true"> | ||
|
||
<RelativeLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:padding="5dp"> | ||
|
||
<ImageView | ||
android:id="@+id/product_image" | ||
android:layout_width="100dp" | ||
android:layout_height="80dp" | ||
android:padding="0.75dp" | ||
android:src="@drawable/profile" | ||
android:scaleType="centerCrop" /> | ||
|
||
<TextView | ||
android:id="@+id/product_title" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="10dp" | ||
android:layout_toRightOf="@+id/product_image" | ||
android:text="TextView" | ||
android:textAppearance="?android:attr/textAppearanceSmall" /> | ||
|
||
</RelativeLayout> | ||
</android.support.v7.widget.CardView> |