Add Animation Get link Facebook X Pinterest Email Other Apps August 25, 2024 holder.itemView.setAnimation(AnimationUtils.loadAnimation(context, R.anim.fade_in)); Get link Facebook X Pinterest Email Other Apps Comments
How To Create Database In Android Studio ?? (Database) February 18, 2024 Just Simple Create New DbHelper Java File and paste below code this code do all create, modify, read and delete (CRUD) operations Read more
How to add layout inflator (Layout Inflators) March 12, 2024 GridLayout coursesgrid=view.findViewById(R.id. coursesgrid ) ; LayoutInflater layoutInflater=getActivity().getLayoutInflater() ; View inflaterview=layoutInflater.inflate(R.layout. coursecardtemplate , coursesgrid ,false ) ; //your coding ImageView courseimg=inflaterview.findViewById(R.id. courseimg ) ; TextView coursetext=inflaterview.findViewById(R.id. coursetext ) ; courseimg.setImageResource(drawables[i]) ; coursetext.setText(coursesname[i]) ; // coursesgrid.addView(inflaterview) ; For Multiple item to inflate simply put all in loop for ( int i= 0 ; i<courses. length ; i++){ GridLayout coursesgrid=view.findViewById(R.id. coursesgrid ) ; LayoutInflater layoutInflater=getActivity().getLayoutInflater() ; View inflaterview=layoutInflater.inflate(R.layout. coursecardtemplate , coursesgrid ,false ) ; ImageView courseimg=inflaterview.findViewById(R.id. courseimg ) ; TextView coursetext=inflaterview.findViewById(R.id. coursetext ) ; courseimg.setImageRe... Read more
Creating RecyclerView and adjusting its margins August 14, 2024 public class RecylerView_ScannedDocumentAdapter extends RecyclerView.Adapter<RecylerView_ScannedDocumentAdapter.ViewHolder> { private Context context ; private List<Uri> imageUris ; public RecylerView_ScannedDocumentAdapter (Context context , List<Uri>imageUris) { this . context =context ; this . imageUris =imageUris ; } @NonNull // for adding the layout inflater @Override public ViewHolder onCreateViewHolder ( @NonNull ViewGroup parent , int viewType) { View view= LayoutInflater. from ( context ).inflate(R.layout. rv_item_scanned_images , parent ,false ) ; return new ViewHolder(view) ; } //adding the data to the files @Override public void onBindViewHolder ( @NonNull ViewHolder holder , int position) { Uri imageUri= imageUris .get(position) ; holder. iv_scannedImages .setImageURI(imageUri) ; } //for running the recyclerview for specific length @Override ... Read more
Comments
Post a Comment