In this challenge you'll build a Magic Ball app in Xamarin.Forms and run it on iOS and/or Android.
Xamarin's Developer Center has Intro to Xamarin.Forms and XAML docs that will help.
Requirements:
- Create a new Xamarin.Forms (PCL) solution (don't forget to update the NuGet package version to use the latest Xamarin.Forms release)
- Use XAML to layout your content page. You'll need at least a textbox, a label, and a button.
- Allow the user to enter a question
- Allow the user to ask the question by pressing a button
- Use the supplied list of Magic 8 ball answers to provide a random answer to the user's question
// http://en.wikipedia.org/wiki/Magic_8-Ball
" It is certain"
, " It is decidedly so"
, " Without a doubt"
, " Yes definitely"
, " You may rely on it"
, " As I see it, yes"
, " Most likely"
, " Outlook good"
, " Yes"
, " Signs point to yes"
, " Reply hazy try again"
, " Ask again later"
, " Better not tell you now"
, " Cannot predict now"
, " Concentrate and ask again"
, " Don't count on it"
, " My reply is no"
, " My sources say no"
, " Outlook not so good"
, " Very doubtful "
Use the DependencyService to read the result using text-to-speech. Sample code for this can be found in the Todo app (see the ITextToSpeech interface and its implementations for iOS and Android).
Use a CustomRenderer to add another button to tweet the result, similar to the TweetButton in this sample. It could say something like "Is my app amazing?" then append the result.
Don't forget to implement the platform-specific renderers for iOS and Android.