Skip to main content

Wrap Up, Homework and Q&A

Lesson 20 from: Building a Twitter App

Tony Hillerson

Wrap Up, Homework and Q&A

Lesson 20 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

20. Wrap Up, Homework and Q&A

Lesson Info

Wrap Up, Homework and Q&A

so is a recap. We tried to load avatars using threads. We found out that that was just too chunky, um, of performance, and we instead switch to load avatars. Using an a sink task, we introduced the A sink task. Then we loaded more tweets. Kind of is a re factoring using a sink to ask. Then we added a menu to the application, and then we posted new tweets. So if you'd like to do a couple different things, there's there's a few different things you could do. One is what I have here. You can add a log out menu item to that menu, and then what that would do it was, would be to fire something off. You could put it into that menu helper, which would have to maybe do a little bit more work to get reference to the right classes. But it could ah, it could just clear out the access token from the oath helper, show a toast. Notification to say yes. You're logged out now and then continue on to the authentication activity. Um, that would be a good way for you to learn about how the menu is set up.

and also to kind of review how we've done how we did the some of the a lot of stuff in that first class. Another thing that you might want to do, which I don't have listed here but would be good to do any way would be to go back and re factor out all the threads completely from the status list activity so that we're loading that initial set of tweets from the from in a sink task instead of using a thread and a runnerup rentable and a handler, which would clean up that code even more, which would be a good thing to do. So. Those are some good homework exercises you might do and what we'll be doing next week. Ah, once your homework is all done and everybody's back here, not next Tuesday is going over. How to make your application look a little bit better than the default white theme that we're using in this case or the black theme by doing some skinning and styling, Um, which is makes things look a lot nicer and we'll be going over all that cool stuff next week. So let's go on to some questions about this week's code, but that's what to look forward to for next week. All right, um, one person asked how you get special keys on the keyboard on the android keyboard? Is it in emulator? I've never done that, but well, first of all, there's a few different things that you can do by telling it, um, different things to this input type. Um, that I don't remember off the top of my head. Uh, see if there's any auto complete Now there's a lot of complete here to help me. But look into the input types for a keyboard because you can make it do some interesting things. Like instead of this Inter, you could have go until it's a go instead of enter. Um, you comptel it, Um, if there are multiple form fields on the same view, you can have this say next. Instead, Um, I don't remember, added, I'm not gonna try to do that live there. There's a way to do that. I remember the correct magical incantations, but you can also have this be Ace Smiley face like a like a colon dash and Perrin, if you'd like. There's a couple of things you can do fairly quickly for changing some of the default keys. Um, but there's also ways that you can do what's called implementing. Ah, I am e method. So I think that is android I m e options additional features you enable in an I am me associated with an editor to improve the integration with your application. So basically, that there's some special things you can do with the keyboard on I m e. I think is input mode. Something I don't remember actually, what it means, But that's something to look up as another way to customize some input options for the user. All right, you guys have any more questions from the chat room I go to? I think Sarah had a question. Yeah. Do you have any comment about being able to make? People were talking about live feedback about when your tweet is too long and possibly being able to make, um something. Make the character count, go red when you're approaching the limit or after the limit. Sure. Uh, yeah. You could do that. Okay. Great. You would do something like, um, see, where is it? Actually happened? Down here in the on text changed. You check to see if the if the charge left was zero or greater are zero less than, um, zero less than zero. And then you would, Um Oh, let's see. How do you change a style? I think the sea on counter text. You could do something like set. I didn't mean to be ornery. That's fine. I always want to be an ordinary Um ah, not background color. Although you could do that. You want to set the foreground color? Maybe said color. No, it's not cold. Well, there, there. So? So there's some way to set the color over the text, and you just you just set that. If their charts charge left is zero or less, Um, or you could, you know, do whatever you wanted. Um, should show a big red blinking something. There's a lot of guesses as to what the command would be. There is such sex color. There it is. So you'd set text color, too Color and Georgia graphics a color dot red. In fact, let's make it happen. Why not? We got all the time in the world, right? You're chars left is less than equal to zero and then we want to do it else to set it back once they delete things. Said, uh, text color, too color dot black. Okay, let's run that and see if my code works while we take any other questions. Another question from the chat room was Teoh actually split up the tweets if there's more than 140. Yeah, it sounds like a good feature. Ah, not sure how you would do that. Let's see. I mean, there's a couple. There's any number of ways you could do that. I mean, I don't think you'd want to do that without telling the user or asking user if they wanted that to be done, you're at least giving them an option of where to split it up. Yeah, yeah, I mean, so that's that's That's a user interface problem, not an android problem. You could think through how you would want to do that for your user. Here's the tweet that I did sure that it works. Okay, alright. So back in the post screen now, once I tape in all sorts of stuff waiting for that red text, no whammies. And now it's red Cool. And then once I delete things. Hopefully it goes back to black. Here we go. Good. So I can post that up to the get help code, if you'd like good coating on the fly there, Tony. Well, we are out of time. So what? I will save all your unanswered questions for the forms and we'll post them there. And Tony will answer those and just want to say thank you again. Tony, this has been a great class and thank you to our sponsor. Add mob. So let's give Tony a big round of applause. Thanks, everybody. Thanks for showing up this week and tune in next week when we go over some skinning and styling. See you then.

RELATED ARTICLES

RELATED ARTICLES