Android Open Source - Antares Auto Tweet Adapter






From Project

Back to project page Antares.

License

The source code is released under:

Apache License

If you think the Android project Antares 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.takac_j30.antares;
// w w w . jav  a 2s  . c  o 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 AutoTweetAdapter extends ArrayAdapter<RuleData> {
  private LayoutInflater inflater;
  private TextView tweet_time, tweet_text;
    public AutoTweetAdapter(Context context, List<RuleData> objects) {
            super(context, 0, objects);
            this.inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
          if(convertView == null) {
              convertView = inflater.inflate(R.layout.auto_tweet_item, parent, false);
            }
            // ??????????
            final RuleData data = getItem(position);
            if(data != null) {
                tweet_time = (TextView) convertView.findViewById(R.id.TweetTime);
              tweet_time.setText(data.time);
              tweet_text = (TextView) convertView.findViewById(R.id.TweetText);
              tweet_text.setText(data.text);
            }
            return convertView;
    }
}

//????????????????
class RuleData {
  String time, text;
  public RuleData(String tm, String tx) {
    this.time = tm;
    this.text = tx;
  }
}




Java Source Code List

com.takac_j30.antares.Account.java
com.takac_j30.antares.AppInformation.java
com.takac_j30.antares.AutoReply.java
com.takac_j30.antares.AutoTweetAdapter.java
com.takac_j30.antares.CustomPagerAdapter.java
com.takac_j30.antares.MainActivity.java
com.takac_j30.antares.OAuthActivity.java
com.takac_j30.antares.ReplySettings.java
com.takac_j30.antares.TweetSettings.java
com.takac_j30.antares.TwitterUtils.java