Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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="wrap_content"
- android:orientation="vertical">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="210dp"
- android:layout_marginBottom="6dp"
- android:orientation="vertical"
- android:paddingEnd="6dp"
- android:paddingStart="6dp">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- >
- <ImageView
- android:id="@+id/addimageview"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true"
- android:scaleType="fitXY"
- app:srcCompat="@drawable/dasboard_card_four" />
- <LinearLayout
- android:layout_width="@dimen/image_card_width"
- android:layout_height="@dimen/image_card"
- android:layout_alignLeft="@id/addimageview"
- android:layout_marginLeft="@dimen/inner_space_right_view"
- android:layout_marginTop="28dp"
- android:orientation="vertical">
- <com.makeramen.roundedimageview.RoundedImageView xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/cardview_image"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:adjustViewBounds="false"
- android:scaleType="fitCenter"
- android:src="@drawable/dasboard_menu_card_icon"
- app:riv_border_color="#333333"
- app:riv_border_width="0dip"
- app:riv_corner_radius="6dip"
- app:riv_mutate_background="true"
- app:riv_oval="false"
- app:riv_tile_mode="repeat" />
- <!--<ImageView-->
- <!--android:id="@+id/imageView3"-->
- <!--android:layout_width="match_parent"-->
- <!--android:layout_height="match_parent"-->
- <!--android:scaleType="centerCrop"-->
- <!--app:srcCompat="@drawable/dasboard_menu_card_icon" />-->
- </LinearLayout>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@id/addimageview"
- android:layout_marginLeft="@dimen/inner_space_txt_view"
- android:layout_marginTop="@dimen/inner_space_top_view_check_amount"
- android:text="Cheque Amount :"
- android:textColor="@android:color/background_light"
- android:textSize="@dimen/text_cheque_titles"
- android:textStyle="bold" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/addimageview"
- android:layout_alignRight="@+id/addimageview"
- android:layout_marginLeft="@dimen/chq_amount_left"
- android:layout_marginRight="@dimen/space_image_btn_right_small_delete"
- android:layout_marginTop="@dimen/inner_space_top_view_check_number"
- android:gravity="right"
- android:orientation="vertical">
- <TextView
- android:id="@+id/chequenumber_cardtxt"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:maxLines="1"
- android:text="51265503"
- android:textColor="@android:color/background_light"
- android:textSize="@dimen/text_cheque_titles" />
- </LinearLayout>
- <TextView
- android:id="@+id/companyname_cardtxt"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@id/addimageview"
- android:layout_marginLeft="@dimen/inner_space_txt_view"
- android:layout_marginTop="@dimen/inner_space_top_view_check_number"
- android:text="Cheque Number :"
- android:textColor="@android:color/background_light"
- android:textSize="@dimen/text_cheque_titles"
- android:textStyle="bold" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/addimageview"
- android:layout_alignRight="@+id/addimageview"
- android:layout_marginLeft="@dimen/chq_amount_left"
- android:layout_marginRight="@dimen/space_image_btn_right_small_delete"
- android:layout_marginTop="@dimen/inner_space_top_view_check_amount"
- android:gravity="right"
- android:orientation="vertical">
- <TextView
- android:id="@+id/chequeamount_cardtxt"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:ellipsize="end"
- android:maxLines="1"
- android:text="$50000"
- android:textColor="@android:color/background_light"
- android:textSize="@dimen/text_cheque_titles" />
- </LinearLayout>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@id/addimageview"
- android:layout_marginLeft="@dimen/inner_space_txt_view"
- android:layout_marginTop="@dimen/inner_space_top_view_check_date"
- android:text="Cheque Date :"
- android:textColor="@android:color/background_light"
- android:textSize="@dimen/text_cheque_titles"
- android:textStyle="bold" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/addimageview"
- android:layout_alignRight="@+id/addimageview"
- android:layout_marginLeft="@dimen/chq_amount_left"
- android:layout_marginRight="@dimen/space_image_btn_right_small_delete"
- android:layout_marginTop="@dimen/inner_space_top_view_check_date"
- android:gravity="top|right"
- android:orientation="vertical">
- <TextView
- android:id="@+id/chequedate_cardtxt"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:maxLines="1"
- android:text="9-Sep-2018"
- android:textColor="@android:color/background_light"
- android:textSize="@dimen/text_cheque_titles" />
- </LinearLayout>
- <ImageButton
- android:id="@+id/imageButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignRight="@id/addimageview"
- android:layout_marginRight="@dimen/space_image_btn_right_small_camera"
- android:layout_marginTop="26dp"
- android:background="@drawable/edit_icon" />
- <ImageButton
- android:id="@+id/imageButton5"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="2dp"
- android:layout_marginTop="26dp"
- android:layout_toStartOf="@+id/imageButton"
- android:background="@drawable/image_view_icon" />
- <ImageButton
- android:id="@+id/delete_imgbtn"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignRight="@id/addimageview"
- android:layout_marginRight="@dimen/space_image_btn_right_small_delete"
- android:layout_marginTop="26dp"
- android:background="@drawable/delete_icon" />
- </RelativeLayout>
- </LinearLayout>
- <View
- android:id="@+id/view2"
- android:layout_width="match_parent"
- android:layout_height="4dp"
- android:background="@color/gray_btn_bg_color" />
- </LinearLayout>
- package com.example.abc.ez_khata;
- import android.content.Context;
- import android.support.annotation.NonNull;
- import android.support.v7.widget.RecyclerView;
- import android.view.LayoutInflater;
- import android.view.View;
- import android.view.ViewGroup;
- import android.widget.ImageView;
- import android.widget.TextView;
- import java.util.List;
- public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.MyViewHolder> {
- Context mContext;
- List<Clients_data> mData;
- public RecyclerViewAdapter(Context mContext ,List<Clients_data> mData){
- this.mContext = mContext;
- this.mData = mData;
- }
- @NonNull
- @Override
- public MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
- View v;
- v = LayoutInflater.from(mContext).inflate(R.layout.lst_records,viewGroup,false);
- MyViewHolder vholder = new MyViewHolder(v);
- return vholder;
- }
- @Override
- public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
- holder.imageview.setImageResource(mData.get(position).getChq_image());
- //holder.imageview.setBackground(mData.get(position).getChq_image());
- holder.chequeamount_cardtxt.setText(mData.get(position).getChq_amount());
- holder.chequedate_cardtxt.setText(mData.get(position).getChq_date());
- holder.chequenumber_cardtxt.setText(mData.get(position).getChq_no());
- }
- @Override
- public int getItemCount() {
- return mData.size();
- }
- public static class MyViewHolder extends RecyclerView.ViewHolder {
- private ImageView imageview;
- private TextView chequeamount_cardtxt;
- private TextView chequenumber_cardtxt;
- private TextView chequedate_cardtxt;
- public MyViewHolder(@NonNull View itemView) {
- super(itemView);
- imageview = (ImageView) itemView.findViewById(R.id.cardview_image);
- chequeamount_cardtxt = (TextView)itemView.findViewById(R.id.chequeamount_cardtxt);
- chequedate_cardtxt = (TextView)itemView.findViewById(R.id.chequedate_cardtxt);
- chequenumber_cardtxt = (TextView)itemView.findViewById(R.id.chequenumber_cardtxt);
- }
- }
- }
Add Comment
Please, Sign In to add comment