Adding the Android Layout View (AXML)
Last updated
Last updated
If you are familiar with XML
or XAML
, there is nothing significant differences between AXML
and them. You need to learn some new syntax. For more details, you can view the doc: http://developer.android.com/guide/topics/ui/declaring-layout.html. Fortunately, VS 2017 provides us with Intellisense.
Now create an AXML
item called SplashScreen.axml
in the Resources/layout folder.
Oftentimes the Design view crashes so open it with Source view. Replace the content with the following code:
This View is used to correspond to the SplashScreen
created in the previous step, which will show a loading text when the app starts. Find the source code here: https://github.com/MvvmCross/MvvmCross/blob/develop/ContentFiles/Android/SplashScreen.axml.pp .
Then create an AXML
item called FirstView.axml
in the same place. Replace the content with the following code:
We use an EditText
control to accept the inputs from users and use a Button control to respond the click event, then show the message by the other TextView
control.