From the course: Advanced Android Espresso Testing

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Incoming intents: Unknown theme

Incoming intents: Unknown theme - Android Tutorial

From the course: Advanced Android Espresso Testing

Start my 1-month free trial

Incoming intents: Unknown theme

- [Instructor] What happens if we launched Ideas Activity with a theme that it doesn't know. Let's try that. Copy and paste the test message Punny. Rename it to Unknown. On line 44, instead of loading the string from resource we are going to hot code the value Silly. We will create the intent and pass it to launch activity the same way so you can keep lines 46 through 48. However, we are not expecting the theme Silly to be displayed in the text view theme because it is not a known theme. Let's go back to the activity and see what it does. Press command shift-T to jump back to Ideas Activity. Scroll to the place where we are handling the theme. On line 39, if you click on it so that it is not in-lining the string, you can see the code. We are parting the string a known theme and passing it a theme. Come on click on a known theme and you can see that it has a place holder, percent one dollar S. That is why we need to pass in the theme so that we can do something with it in the place…

Contents