Search in sources :

Example 61 with TextView

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;
}
Also used : Context(android.content.Context) EditText(android.widget.EditText) NetworkedCacheableImageView(com.klinker.android.twitter.views.NetworkedCacheableImageView) ImageView(android.widget.ImageView) View(android.view.View) TextView(android.widget.TextView) RejectedExecutionException(java.util.concurrent.RejectedExecutionException) IOException(java.io.IOException) NetworkedCacheableImageView(com.klinker.android.twitter.views.NetworkedCacheableImageView) ImageButton(android.widget.ImageButton) PackageManager(android.content.pm.PackageManager) TextView(android.widget.TextView) NetworkedCacheableImageView(com.klinker.android.twitter.views.NetworkedCacheableImageView) ImageView(android.widget.ImageView) LinearLayout(android.widget.LinearLayout)

Example 62 with TextView

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;
}
Also used : TextView(android.widget.TextView) View(android.view.View)

Example 63 with TextView

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;
}
Also used : TextView(android.widget.TextView) View(android.view.View)

Example 64 with TextView

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;
}
Also used : TextView(android.widget.TextView) View(android.view.View)

Example 65 with TextView

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;
}
Also used : Bundle(android.os.Bundle) Handler(android.os.Handler) TextView(android.widget.TextView) ImageView(android.widget.ImageView) CircledImageView(android.support.wearable.view.CircledImageView) TextView(android.widget.TextView) View(android.view.View) File(java.io.File) CircledImageView(android.support.wearable.view.CircledImageView)

Aggregations

TextView (android.widget.TextView)4994 View (android.view.View)2680 ImageView (android.widget.ImageView)1137 Button (android.widget.Button)442 LinearLayout (android.widget.LinearLayout)439 LayoutInflater (android.view.LayoutInflater)425 Intent (android.content.Intent)397 ListView (android.widget.ListView)389 AdapterView (android.widget.AdapterView)372 ViewGroup (android.view.ViewGroup)322 OnClickListener (android.view.View.OnClickListener)304 RecyclerView (android.support.v7.widget.RecyclerView)197 Test (org.junit.Test)197 ScrollView (android.widget.ScrollView)166 DialogInterface (android.content.DialogInterface)162 Context (android.content.Context)156 Drawable (android.graphics.drawable.Drawable)155 EditText (android.widget.EditText)149 AlertDialog (android.app.AlertDialog)144 Bundle (android.os.Bundle)144