Skip to main content

Introduction to Loading Tweets and Threading

Lesson 8 from: Building a Twitter App

Tony Hillerson

Introduction to Loading Tweets and Threading

Lesson 8 from: Building a Twitter App

Tony Hillerson

buy this class

$00

$00
Sale Ends Soon!

starting under

$13/month*

Unlock this classplus 2200+ more >

Lesson Info

8. Introduction to Loading Tweets and Threading

Lesson Info

Introduction to Loading Tweets and Threading

hello. Welcome to Week two, in which we discover how to use threads. Um, hand will be loading the tweets from the home page or from your Twitter home timeline and then loading newer and older tweets and then finally, dis displaying individual tweets. Part of that time, we're going to be spending looking at an important android topic, actually an important topic for any user interface programming. And that's dealing with the concurrent operations dealing with threads and in some way, shape or form, making sure that the user interface doesn't become unresponsive. When you're running long running tasks, there will be a few new classes that are created in the code for the separation. We're gonna have a status detail activity in the last step where we show I want any particular status or tweet 11 screen, um, to show one tweet. And then we're gonna be changing the status list activity, and we'll add a few more layouts as Java files and also those XML files. All right, so let's talk about loa...

ding the home timeline, and what we're gonna be doing during this class will be running into a few new friends as we look through the, um, as we look to the code. Um, one thing that we're gonna be doing is paging or loading newer or older tweets because we can't load every tweet up front, there's there could be too many potentially. So we have to have some way to page through That list of tweets and Twitter for J provides us with the class to do that called paging, So we'll be looking at how that works. We'll also be looking at sort of advanced feature of the Android list, which is a header and footer view, which allows us to add custom views at the top or bottom of the list. And we don't have to manage those views in the adapter so the adapter can stay focused on, ah, on the particular data that listening is to show. And then we can have more user interface type of Ford Ince's on the list of the top or bottom, and we'll also be looking at a Progress bar, which lets us show some progress, which is important when we're doing background background tasks. And then we'll look at the handler class, which is the class that allows the your your code that's on the main threat to talk with back with threads that are running in the background and communicate when they're done. And, um and how android allows you to do that? So as a user using this application, there's a few things that I'm gonna accomplish, Um, that we're gonna build out today. Once it one is, we need to view the home timeline. We're already already sauce kind of showing that in an ugly way in the last class. So we're gonna clean that up just a little bit, and then I want to be able to load newer tweets. So if I'm on the the, uh, the view showing all of my tweets, I think there may be something new or just come back to the application after a little while, I want to see whatever is going been going on since the last time I was there. Someone a load, some new tweets, and maybe I want a page back through older tweets. So I want to be able to load load tweets, their older, the ones that I'm seeing, and then I want to be able to see some progress whenever the application doesn't work because it was I'm gonna be I'm gonna be confused. Or maybe I'm not gonna trust what's going on because it seems like the application is unresponsive.

RELATED ARTICLES

RELATED ARTICLES