Android Open Source - PhotoToDucksboard Widget Info Adapter






From Project

Back to project page PhotoToDucksboard.

License

The source code is released under:

Copyright (c) 2012 Jan Urbanski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Softw...

If you think the Android project PhotoToDucksboard 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.ducksboard.photo;
/*from w ww . j a  v  a2 s .co  m*/
import java.util.List;

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


public class WidgetInfoAdapter extends ArrayAdapter<WidgetInfo> {

    public WidgetInfoAdapter(Context context, int textViewResourceId,
            List<WidgetInfo> widgets) {
        super(context, textViewResourceId, widgets);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
            LayoutInflater inflater = (LayoutInflater) getContext()
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            convertView = inflater.inflate(R.layout.widget_item, null);
        }

        TextView widgetTitleText = (TextView) convertView
                .findViewById(R.id.widgetTitle);
        TextView dashboardNameText = (TextView) convertView
                .findViewById(R.id.widgetDashboard);
        WidgetInfo item = getItem(position);

        widgetTitleText.setText(item.title);
        dashboardNameText.setText("in dashboard " + item.dashboard);

        return convertView;
    }
}




Java Source Code List

com.ducksboard.photo.ApiKeyCredentials.java
com.ducksboard.photo.ConfigurationActivity.java
com.ducksboard.photo.Credentials.java
com.ducksboard.photo.DucksboardApi.java
com.ducksboard.photo.ImageResizer.java
com.ducksboard.photo.SaveConfiguration.java
com.ducksboard.photo.SendImage.java
com.ducksboard.photo.SendInfo.java
com.ducksboard.photo.ShareActivity.java
com.ducksboard.photo.UserInfo.java
com.ducksboard.photo.UserPasswordCredentials.java
com.ducksboard.photo.WidgetInfoAdapter.java
com.ducksboard.photo.WidgetInfo.java
com.ducksboard.photo.WidgetsListLoad.java