When you create a simple pre made template in AIDE, these files are created for you. Each app you create must have at least 1 activity, and within that activity there is a text view. Within this text view is where you place the text you want shown in your app. (essentially a text view is like a web page view, although a text view is a tablet screen size not a computer screen size)
To code the text you want shown in each text view, you use a string. These strings are coded then placed in a file called "strings.xml". The strings.xml file is at folder res/values/strings.xml
You can have as many strings as you want for whatever you want; from titles, words, paragraph headings, photo descriptions; basically whatever your app is about and the text required for it.
If your app has more than one activity (one page) then each additional page needs a text view, and that text
view would also need strings.xml to add text to the page.
Looking at strings.xml image; we see there is s string named
androidTutorialsIntro and that the wording/text for that string is Learn Android For Beginners
There is also a string named
app_name and the wording/text for that string is
Learn To create Android Apps- AndroidAppCoding.com.
Looking at this next image: androidmanifest.xml
We see the android label has a string named 'app_name'. This is the name you give your app and it will show at the top left of your screen next to the app's icon. To code it we must place the 'text' we want shown into the strings file as shown in the previous image.
The app_name is also shown in the androidmanifest.xml file; in the application and activity elements; as shown in this image.
The main.xml is a file that has the textView particulars, the attributes for each coded property. Example, you may want the text to be centered in the textView, to be a certain size, bold or not bold, italic or not, text color; all of these are coded in the main.xml file for each property you add as shown in this image.
Let's look at the particulars of the code in the 'TextView', of this image. We see the textview properties and their attributes: the text is to be wrapped, the text should be 10dp from the top of the TextView, the text size is 25dp, the typeface is "sans", the text color is #46C646 (green), the text color link is #eeefff .
And, any domain names should automatically be hperlinked; autoLink=web example; if androidappcoding.com is placed in the text view string, not only will it show as text, but it will be clickable also.
android:text="@string/mathintro", means there is some Text to be placed in the screen view for this activity.
To see what is text is; you would goto the strings.xml file and look for mathintro, which you can see by looking at this image is
- PreAlgebra Learn Equations.
Your Android App will be updated with the newest text you add or edit - just makes changes to the strings.xml file and then RUN your app.
This free script provided by