Android Open Source - Yeah-MaterialLove Blindtext View Holder






From Project

Back to project page Yeah-MaterialLove.

License

The source code is released under:

Apache License

If you think the Android project Yeah-MaterialLove listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.yeahdev.materiallovetesting.easyadapterexample;
/*  www  .ja  v a 2 s.c  om*/
import android.support.v7.widget.CardView;
import android.view.View;
import android.widget.Toast;

import com.devspark.robototextview.widget.RobotoTextView;
import com.yeahdev.materiallovetesting.R;

import uk.co.ribot.easyadapter.ItemViewHolder;
import uk.co.ribot.easyadapter.PositionInfo;
import uk.co.ribot.easyadapter.annotations.LayoutId;
import uk.co.ribot.easyadapter.annotations.ViewId;

@LayoutId(R.layout.recycler_view_card_view_item)
public class BlindtextViewHolder extends ItemViewHolder<Blindtext> {

    @ViewId(R.id.cvRecyclerViewItem)
    CardView cvRecyclerViewCardViewItem;
    @ViewId(R.id.tvRecyclerViewCardViewTitle)
    RobotoTextView tvCardViewTitle;
    @ViewId(R.id.tvRecyclerViewCardViewContent)
    RobotoTextView tvCardViewContent;

    public BlindtextViewHolder(View view){
        super(view);
    }

    @Override
    public void onSetValues(Blindtext blindtext, PositionInfo positionInfo) {
        tvCardViewTitle.setText(blindtext.getTitleBlindtext());
        tvCardViewContent.setText(blindtext.getContentBlindtext());
    }

    @Override
    public void onSetListeners() {
        super.onSetListeners();
        //
        cvRecyclerViewCardViewItem.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Blindtext blindtext = getItem();
                //
                if (blindtext != null) {
                    Toast.makeText(getContext(),"Title: " + blindtext.getTitleBlindtext(),Toast.LENGTH_SHORT).show();
                }
            }
        });
    }
}




Java Source Code List

com.yeahdev.materiallovetesting.ApplicationTest.java
com.yeahdev.materiallovetesting.activities.GPlusLoginActivity.java
com.yeahdev.materiallovetesting.activities.MainActivity.java
com.yeahdev.materiallovetesting.adapter.AboutAdapter.java
com.yeahdev.materiallovetesting.adapter.CoveredTechnicAdapter.java
com.yeahdev.materiallovetesting.adapter.DrawerListAdapter.java
com.yeahdev.materiallovetesting.easyadapterexample.BlindtextViewHolder.java
com.yeahdev.materiallovetesting.easyadapterexample.Blindtext.java
com.yeahdev.materiallovetesting.easyadapterexample.DataProvider.java
com.yeahdev.materiallovetesting.fragments.AboutFragment.java
com.yeahdev.materiallovetesting.fragments.BugreportFragment.java
com.yeahdev.materiallovetesting.fragments.FeedbackFragment.java
com.yeahdev.materiallovetesting.fragments.GithubIssusFragment.java
com.yeahdev.materiallovetesting.fragments.RecyclerViewFragment.java
com.yeahdev.materiallovetesting.fragments.WelcomeFragment.java
com.yeahdev.materiallovetesting.interfaces.IPassSelectedFragmentFromFAB.java