use of android.widget.TextView in project Talon-for-Twitter by klinker24.
the class TimelineArrayAdapter method newView.
public View newView(ViewGroup viewGroup) {
View v = null;
final ViewHolder holder = new ViewHolder();
if (settings.addonTheme) {
try {
Context viewContext = null;
if (res == null) {
res = context.getPackageManager().getResourcesForApplication(settings.addonThemePackage);
}
try {
viewContext = context.createPackageContext(settings.addonThemePackage, Context.CONTEXT_IGNORE_SECURITY);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
if (res != null && viewContext != null) {
int id = res.getIdentifier("tweet", "layout", settings.addonThemePackage);
v = LayoutInflater.from(viewContext).inflate(res.getLayout(id), null);
holder.name = (TextView) v.findViewById(res.getIdentifier("name", "id", settings.addonThemePackage));
holder.profilePic = (ImageView) v.findViewById(res.getIdentifier("profile_pic", "id", settings.addonThemePackage));
holder.time = (TextView) v.findViewById(res.getIdentifier("time", "id", settings.addonThemePackage));
holder.tweet = (TextView) v.findViewById(res.getIdentifier("tweet", "id", settings.addonThemePackage));
holder.reply = (EditText) v.findViewById(res.getIdentifier("reply", "id", settings.addonThemePackage));
holder.favorite = (ImageButton) v.findViewById(res.getIdentifier("favorite", "id", settings.addonThemePackage));
holder.retweet = (ImageButton) v.findViewById(res.getIdentifier("retweet", "id", settings.addonThemePackage));
holder.favCount = (TextView) v.findViewById(res.getIdentifier("fav_count", "id", settings.addonThemePackage));
holder.retweetCount = (TextView) v.findViewById(res.getIdentifier("retweet_count", "id", settings.addonThemePackage));
holder.expandArea = (LinearLayout) v.findViewById(res.getIdentifier("expansion", "id", settings.addonThemePackage));
holder.replyButton = (ImageButton) v.findViewById(res.getIdentifier("reply_button", "id", settings.addonThemePackage));
holder.image = (ImageView) v.findViewById(res.getIdentifier("image", "id", settings.addonThemePackage));
holder.retweeter = (TextView) v.findViewById(res.getIdentifier("retweeter", "id", settings.addonThemePackage));
holder.background = (LinearLayout) v.findViewById(res.getIdentifier("background", "id", settings.addonThemePackage));
holder.playButton = (ImageView) v.findViewById(res.getIdentifier("play_button", "id", settings.addonThemePackage));
holder.screenTV = (TextView) v.findViewById(res.getIdentifier("screenname", "id", settings.addonThemePackage));
try {
holder.quoteButton = (ImageButton) v.findViewById(res.getIdentifier("quote_button", "id", settings.addonThemePackage));
holder.shareButton = (ImageButton) v.findViewById(res.getIdentifier("share_button", "id", settings.addonThemePackage));
} catch (Exception e) {
// they don't exist because the theme was made before they were added
}
try {
holder.isAConversation = (ImageView) v.findViewById(res.getIdentifier("is_a_conversation", "id", settings.addonThemePackage));
} catch (Exception e) {
}
}
} catch (Exception e) {
e.printStackTrace();
v = inflater.inflate(layout, viewGroup, false);
holder.name = (TextView) v.findViewById(R.id.name);
holder.profilePic = (ImageView) v.findViewById(R.id.profile_pic);
holder.time = (TextView) v.findViewById(R.id.time);
holder.tweet = (TextView) v.findViewById(R.id.tweet);
holder.reply = (EditText) v.findViewById(R.id.reply);
holder.favorite = (ImageButton) v.findViewById(R.id.favorite);
holder.retweet = (ImageButton) v.findViewById(R.id.retweet);
holder.favCount = (TextView) v.findViewById(R.id.fav_count);
holder.retweetCount = (TextView) v.findViewById(R.id.retweet_count);
holder.expandArea = (LinearLayout) v.findViewById(R.id.expansion);
holder.replyButton = (ImageButton) v.findViewById(R.id.reply_button);
holder.image = (NetworkedCacheableImageView) v.findViewById(R.id.image);
holder.retweeter = (TextView) v.findViewById(R.id.retweeter);
holder.background = (LinearLayout) v.findViewById(R.id.background);
holder.playButton = (NetworkedCacheableImageView) v.findViewById(R.id.play_button);
holder.screenTV = (TextView) v.findViewById(R.id.screenname);
try {
holder.quoteButton = (ImageButton) v.findViewById(R.id.quote_button);
holder.shareButton = (ImageButton) v.findViewById(R.id.share_button);
} catch (Exception x) {
// theme was made before they were added
}
try {
holder.isAConversation = (ImageView) v.findViewById(R.id.is_a_conversation);
} catch (Exception x) {
}
}
} else {
v = inflater.inflate(layout, viewGroup, false);
holder.name = (TextView) v.findViewById(R.id.name);
holder.profilePic = (ImageView) v.findViewById(R.id.profile_pic);
holder.time = (TextView) v.findViewById(R.id.time);
holder.tweet = (TextView) v.findViewById(R.id.tweet);
holder.reply = (EditText) v.findViewById(R.id.reply);
holder.favorite = (ImageButton) v.findViewById(R.id.favorite);
holder.retweet = (ImageButton) v.findViewById(R.id.retweet);
holder.favCount = (TextView) v.findViewById(R.id.fav_count);
holder.retweetCount = (TextView) v.findViewById(R.id.retweet_count);
holder.expandArea = (LinearLayout) v.findViewById(R.id.expansion);
holder.replyButton = (ImageButton) v.findViewById(R.id.reply_button);
holder.image = (NetworkedCacheableImageView) v.findViewById(R.id.image);
holder.retweeter = (TextView) v.findViewById(R.id.retweeter);
holder.background = (LinearLayout) v.findViewById(R.id.background);
holder.playButton = (NetworkedCacheableImageView) v.findViewById(R.id.play_button);
holder.screenTV = (TextView) v.findViewById(R.id.screenname);
try {
holder.quoteButton = (ImageButton) v.findViewById(R.id.quote_button);
holder.shareButton = (ImageButton) v.findViewById(R.id.share_button);
} catch (Exception x) {
// theme was made before they were added
}
try {
holder.isAConversation = (ImageView) v.findViewById(R.id.is_a_conversation);
} catch (Exception x) {
}
}
// sets up the font sizes
holder.tweet.setTextSize(settings.textSize);
holder.name.setTextSize(settings.textSize + 4);
holder.screenTV.setTextSize(settings.textSize - 2);
holder.time.setTextSize(settings.textSize - 3);
holder.retweeter.setTextSize(settings.textSize - 3);
holder.favCount.setTextSize(settings.textSize + 1);
holder.retweetCount.setTextSize(settings.textSize + 1);
holder.reply.setTextSize(settings.textSize);
v.setTag(holder);
return v;
}
use of android.widget.TextView in project Talon-for-Twitter by klinker24.
the class ListsArrayAdapter method newView.
public View newView(ViewGroup viewGroup) {
View v;
final ViewHolder holder;
v = inflater.inflate(R.layout.text, viewGroup, false);
holder = new ViewHolder();
holder.text = (TextView) v.findViewById(R.id.text);
// sets up the font sizes
holder.text.setTextSize(24);
v.setTag(holder);
return v;
}
use of android.widget.TextView in project Talon-for-Twitter by klinker24.
the class TrendsArrayAdapter method newView.
public View newView(ViewGroup viewGroup) {
View v;
final ViewHolder holder;
v = inflater.inflate(R.layout.text, viewGroup, false);
holder = new ViewHolder();
holder.text = (TextView) v.findViewById(R.id.text);
// sets up the font sizes
holder.text.setTextSize(24);
v.setTag(holder);
return v;
}
use of android.widget.TextView in project Talon-for-Twitter by klinker24.
the class FAQArrayAdapter method newView.
public View newView(ViewGroup viewGroup) {
View v = inflater.inflate(R.layout.text, viewGroup, false);
;
final ViewHolder holder = new ViewHolder();
holder.text = (TextView) v.findViewById(R.id.text);
holder.text.setTextSize(20);
v.setTag(holder);
return v;
}
use of android.widget.TextView in project Talon-for-Twitter by klinker24.
the class ExpandableCardFragment method onCreateContentView.
@Override
public View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
handler = new Handler();
View view = inflater.inflate(R.layout.card_expandable, container, false);
final TextView name = (TextView) view.findViewById(R.id.name);
final TextView screenname = (TextView) view.findViewById(R.id.screenname);
final CircledImageView profilePic = (CircledImageView) view.findViewById(R.id.profile_picture);
text = (TextView) view.findViewById(R.id.text);
Bundle args = this.getArguments();
if (args != null) {
if (args.containsKey(ARG_USER_NAME) && name != null) {
name.setText(args.getCharSequence(ARG_USER_NAME));
}
if (args.containsKey(ARG_SCREENNAME) && screenname != null) {
screenname.setText("@" + args.getCharSequence(ARG_SCREENNAME));
}
if (args.containsKey(ARG_TWEET) && text != null) {
text.setText(args.getCharSequence(ARG_TWEET));
}
}
setExpansionFactor(currentExpansionFactor);
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
currentExpansionFactor *= 5;
setExpansionFactor(currentExpansionFactor);
}
});
Thread loader = new Thread(new Runnable() {
@Override
public void run() {
if (getActivity() == null) {
return;
}
File image = new File(getActivity().getCacheDir(), getArguments().getString(ARG_PRO_PIC_URL));
checkExisting(image, profilePic, 0);
}
});
loader.setPriority(Thread.MIN_PRIORITY);
loader.start();
return view;
}
Aggregations