Code example for View

Methods: getTag

     * @param text The text to display 
     * @param position The position withion the list 
     * @return The converted view 
    public static View convertText(View convertView, String text, int position) {
        if(convertView.getTag() != null && ((String) convertView.getTag()).equals("text")) {
            ((TextView) convertView).setText(text);
            return convertView;
        } else { 
            return null; 
     * Create a text view ready to be a list item. 
     * @param position      The position within the list. 
     * @param context       The context. 
Experience pair programming with AI  Get Codota for Java