Android Open Source - Yeah-MaterialLove About Adapter

From Project

Back to project page Yeah-MaterialLove.


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.adapter;
// ww  w .  j a  va2  s.  c  om

import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;

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

public class AboutAdapter extends ArrayAdapter<String> {
     * Tutorial:
    private Context mContext;

    private final static String[] ABOUTTITLE = {
            "Android-RobotoTextView by johnkil",
            "CircleImageView by hdodenhof",
            "Easy Adapter by ribot",
            "FloatingActionButton by makovkastar",
            "Material Dialogs by afollestad",
            "ShowcaseView by amlcurran",
            "Snackbar by wmora",
            "SystemBarTint by jgilfelt"

    private final static String[] ABOUTLINKS = {

    public AboutAdapter(Context context) {
        super(context, R.layout.listview_item_about);
        this.mContext = context;

    public int getCount() {
        return ABOUTTITLE.length;

    public View getView(final int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
            convertView = LayoutInflater.from(getContext()).inflate(R.layout.listview_item_about, parent, false);

        RobotoTextView tvTitle = (RobotoTextView) convertView.findViewById(;

        RobotoTextView tvLink = (RobotoTextView) convertView.findViewById(;
        tvLink.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(ABOUTLINKS[position])));

        return convertView;

Java Source Code List