Tbutler includes software from Twitter4J to parse Twitter response from the Twitter API. You can see the license term at http://twitter4j.org/en/index.html#license
Copyright (c) 2009-2010, David Parr...
If you think the Android project TButler 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.davidparry.twitter.widgets;
//www.java2s.comimport java.util.List;
import android.content.Context;
import android.content.Intent;
import android.preference.CheckBoxPreference;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import com.davidparry.twitter.ButlerTabActivity;
import com.davidparry.twitter.R;
publicclass TwitterCheckBox extends CheckBoxPreference {
privatestaticfinal String TAG = "TwitterCheckBox";
public TwitterCheckBox(Context context) {
super(context);
}
public TwitterCheckBox(Context context, AttributeSet attrs) {
super(context, attrs);
}
public TwitterCheckBox(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protectedvoid onClick() {
super.onClick();
Log.d(TAG, "OnClick");
}
@Override
protectedvoid onBindView(View view) {
super.onBindView(view);
Log.d(TAG, "onBindView");
}
@Override
public View getView(View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
LayoutInflater vi = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.prefsearch, null);
// only add one listener
List<View> c =v.getTouchables();
ImageButton b = (ImageButton) c.get(0);
b.setOnClickListener(
new OnClickListener(){
publicvoid onClick(View v) {
Intent intent = new Intent();
intent.setClass(v.getContext(), ButlerTabActivity.class);
v.getContext().startActivity(intent);
}
});
}
return v;
}
}