vlaljani / VLTwitterClient

0 stars 0 forks source link

[Android Bootcamp] Project 4: Twitter Client Redux - Ready for Review #2

Open vlaljani opened 9 years ago

vlaljani commented 9 years ago

Hi,

My app is complete. Please review. @codepathreview @codepath

Thanks much!

Best, Vibha

vlaljani commented 9 years ago

Indeterminate progress bar: I had this in there in my custom action bar, but it was not working as I wanted it to. It wasn't displaying as much as I would've liked. I had call backs in my activities from my fragments, which were made before and after the calls to the client endpoints. So I switched to generic adapter to get the last row as an indeterminate progress bar (which made me realize that I should've stuck to the original). This one did not work well at all for my search timeline for some reason. It kept going to the bottom even before I'd had a chance to scroll there.

So hopefully I can talk to someone from the support team more about this tomorrow

nesquena commented 9 years ago

So I switched to generic adapter to get the last row as an indeterminate progress bar (which made me realize that I should've stuck to the original). This one did not work well at all for my search timeline for some reason. It kept going to the bottom even before I'd had a chance to scroll there.

You should add a progress bar in the footer of the ListView instead: http://stackoverflow.com/a/3961716/313399 should avoid a lot of these issues. Let me know if you get a chance to try this.

vlaljani commented 9 years ago

Ah that works as well as Generic adapter without losing array adapter!

I am attaching a recording of my lice cap with that. And checking in the code too.

However, only for the search alone - it keeps scrolling and scrolling itself to the bottom without me asking it to (which it doesn't do without the footer). Any idea about that? (It's in the video. The failure in the end is because of OOM)

vlaljani commented 9 years ago

Actually, it's doing that for all the timelines now. I even added the count to the search query, which I thought might've caused it. On the upside - I know it's infinite scrolling for sure :)

nesquena commented 9 years ago

Vibha, try adding the footer at the very beginning right before you even setup the adapter. Then keep a reference to the progressbar in the footer. Just set the visibility between GONE and VISIBLE and it shouldn't jump. Just don't add or remove the footer after you've set the adapter. Let me know if that doesn't work.

vlaljani commented 9 years ago

Hi Nathan,

I tried this last night, and it kept thinking that my progress bar handle was a null object. I'll bring it in today so you can tell me what I'm doing wrong

In TweetsListFragment: protected ProgressBar pb; lvTweets = (ListView) view.findViewById(R.id.lvTweets); swipeContainer = (SwipeRefreshLayout) view.findViewById(R.id.swipeContainer); swipeContainer.setColorSchemeResources(R.color.twitter_blue, R.color.white, R.color.twitter_blue, R.color.white);

    View v = inflater.inflate(R.layout.progress, null);
    pb = (ProgressBar) v.findViewById(R.id.pb);
    lvTweets.addFooterView(v);

    lvTweets.setAdapter(tweetArrayAdapter);

    setupViewListeners();

and in populateTimeline: if (Constants.isNetworkAvailable(getActivity())) { pb.setVisibility(View.VISIBLE); client.getHomeTimeline(max_id, new JsonHttpResponseHandler() {

codepathreview commented 9 years ago

:+1: Excellent work again Vibha, appreciate all the efforts that you put in these assignments outside of your fulltime job. A few notes after checking out the code:

Here's a detailed Project 4 Feedback Guide here which covers the most common issues with this submitted project. Read through the feedback guide point-by-point to determine how you might be able to improve your submission.

This week (Week 5), we are going to cover the last major piece to the Android puzzle and that is using the hardware and SDK components such as the camera, photo gallery, location, maps, etc. After that, Week 6 and week 7 we will be covering a few important intermediate topics such as more about styling and animation as well as testing.

Following the bootcamp, we are going to have a public demo day to celebrate the progress you've all made with our next batch of Android students and multiple companies attending to see the group projects that you all have built. We are going to help however we can over the next few weeks to get the team project apps in shape for that.