NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

fragment_prakar...
<layout xmlns:android="http://schemas.android.com/apk/res/android">

<data>

<variable
name="wada"
type="com.example.sifarismobileapp.viewmodels.MainViewModel" />
</data>

<LinearLayout xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.fragments.PrakarFragment">


<androidx.recyclerview.widget.RecyclerView
android:id="@+id/prakarrecyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
tools:listitem="@layout/prakar_recycler_layout" />
</LinearLayout>

</layout>

prakar_recycler_layout...
<layout xmlns:app="http://schemas.android.com/apk/res-auto">

<data>

<variable
name="prakar"
type="com.example.sifarismobileapp.source.models.report.ReportModel" />
</data>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
app:cardElevation="5dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
android:id="@+id/biwaha_region"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">

<TextView
android:layout_width="130dp"
android:layout_height="wrap_content"
android:text="विवाह"
android:textSize="25sp"
android:textStyle="bold" />

<TextView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="end"
android:text="100"
android:textSize="25sp"
android:textStyle="bold" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:src="@drawable/arrow_drop_down" />
</LinearLayout>

<LinearLayout
android:id="@+id/invisible_region"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="5dp">

<view
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="15dp"
android:backgroundTint="@color/colorPrimary" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="horizontal">


<TextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="वडा न. १"
android:textSize="25sp" />

<TextView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="end"
android:text="100"
android:textSize="25sp" />


</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="horizontal">


<TextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="वडा न. २"
android:textSize="25sp" />

<TextView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="end"
android:text="10"
android:textSize="25sp" />


</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="horizontal">


<TextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="वडा न. ३"
android:textSize="25sp" />

<TextView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="end"
android:text="10"
android:textSize="25sp" />


</LinearLayout>

</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:elevation="5dp"
app:cardCornerRadius="5dp"
app:cardElevation="5dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
android:id="@+id/charkilla"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">

<TextView
android:layout_width="130dp"
android:layout_height="wrap_content"
android:text="चारकिल्ला"
android:textSize="25sp"
android:textStyle="bold" />

<TextView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="end"
android:text="100"
android:textSize="25sp"
android:textStyle="bold" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:src="@drawable/arrow_drop_down" />
</LinearLayout>

<LinearLayout
android:id="@+id/sansthagat_region"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="5dp">

<view
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="15dp"
android:backgroundTint="@color/colorPrimary" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="horizontal">


<TextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="वडा न. १"
android:textSize="25sp" />

<TextView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="end"
android:text="100"
android:textSize="25sp" />


</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="horizontal">


<TextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="वडा न. २"
android:textSize="25sp" />

<TextView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="end"
android:text="10"
android:textSize="25sp" />


</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="horizontal">


<TextView
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="वडा न. ३"
android:textSize="25sp" />

<TextView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="end"
android:text="10"
android:textSize="25sp" />


</LinearLayout>

</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

</LinearLayout>

</layout>

PrakarRecyclerAdapter.java..
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;

import com.example.sifarismobileapp.databinding.PrakarRecyclerLayoutBinding;
import com.example.sifarismobileapp.source.models.report.ReportModel;

class PrakarRecyclerAdater extends RecyclerView.Adapter<PrakarRecyclerAdater.ViewHolder> {

private ReportModel reportModel;

@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
PrakarRecyclerLayoutBinding binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), viewType, parent, false);
return new ViewHolder(binding);
}



@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {

holder.binding.setPrakar(reportModel);

}

@Override
public int getItemCount() {
return 1;
}

public void setSamuhaData(ReportModel reportModel) {
this.reportModel = reportModel;
notifyDataSetChanged();

}

static class ViewHolder extends RecyclerView.ViewHolder {
private PrakarRecyclerLayoutBinding binding;

ViewHolder(@NonNull PrakarRecyclerLayoutBinding binding) {
super(binding.getRoot());
this.binding = binding;
}

}
}


Prakar Fragment..
public class PrakarFragment extends DaggerFragment {

@Inject
ViewModelFactory factory;
private PrakarRecyclerAdapter prakarRecyclerAdapter = new PrakarRecycleAdapter();
public PrakarFragment() {
}
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
FragmentPrakarBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_prakar, container, false);
MainViewModel mainViewModel = new ViewModelProvider((ViewModelStoreOwner) this, factory).get(MainViewModel.class);
binding.setWada(mainViewModel);
binding.prakarrecyclerView.setHasFixedSize(true);
binding.prakarrecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
binding.prakarrecyclerView.setAdapter(prakarRecyclerAdapter);
mainViewModel.getReport().observe(getViewLifecycleOwner(), reportData -> {
prakarRecyclerAdapter.setPrakarData(reportData);
});
return binding.getRoot();
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.