Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9221163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:31:03+00:00 2026-06-18T03:31:03+00:00

I have a RSS feed viewer and wanted to show the user the last

  • 0

I have a RSS feed viewer and wanted to show the user the last time they listened to a particular feed.

This works for the first items loaded in the list (the items that are visible in the current view), but as the user scrolls down the listview, the lastViewedText for every other viewed feed is hidden. Additionally, when the user scrolls back up to the top (where the lastViewedText was successfully displayed before) the lastViewedText is now hidden. The BaseAdapters getView method is where I set the visibility.

Custom BaseAdapter:

public class PodcastAdapter extends BaseAdapter{

    private ArrayList<Podcast> feed;
    private LayoutInflater inflater = null;

    public PodcastAdapter(Activity a, ArrayList<Podcast> feed){
        this.feed = feed;
        inflater = (LayoutInflater)a.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    }

    public int getCount() {
        return feed.size();
    }

    public Object getItem(int position) {
        return feed.get(position);
    }

    public long getItemId(int position) {
        return position;
    }

    public View getView(int position, View convertView, ViewGroup parent) {
        View vi = convertView;
        if(convertView == null)
            vi = inflater.inflate(R.layout.rss_listview_item, null);

        TextView title = (TextView)vi.findViewById(R.id.title);
        TextView desc = (TextView)vi.findViewById(R.id.description);
        TextView date = (TextView)vi.findViewById(R.id.date);
        TextView lastViewedText = (TextView)vi.findViewById(R.id.lastViewedText);

        Podcast feedIndex = feed.get(position);

        title.setText(feedIndex.Title);
        desc.setText(feedIndex.Description);
        date.setText(feedIndex.Date);
        lastViewedText.setText(feedIndex.LastViewedText);


        if(feedIndex.LastViewedText.equals("")){
            lastViewedText.setVisibility(View.GONE);
        }

        return vi;
    }
}

Why is the view not updating properly? The title, desc, date are all loaded properly!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:31:04+00:00Added an answer on June 18, 2026 at 3:31 am
       if(feedIndex.LastViewedText.equals("")){
                lastViewedText.setVisibility(View.GONE);
            } else {
                lastViewedText.setVisibility(View.VISIBLE);
        }
    

    The view is hidden in the convert view, and you dont unhide it:)

    Also, you can use TextUtils.isEmpty(CharSequence string), to check if a String is empty or null.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this script to generate an XML file for an RSS feed. Works
I have a YouTube RSS feed set up to show YouTube videos in a
I have a site that has an Rss feed, and this feed is consumed
I have 4 rss feed in the same website. My function looks like this:
i have this rss feed to parse that contains several tags. i am able
I am planing to display Rss feed inside an Androind app I have this
I have previsously parsed this RSS Feed, now that I have updated it to
I have an rss feed that is formatted something like this: <item> <posturl>mysite.com/abc.html</posturl> <imagepath>123.jpg</imagepath>
I have a RSS feed in an XML file at the root level. I
I have a RSS feed i need to display in a table (its clothes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.