How to run an application and modify simply
1. How to run mobile application
If we don’t have a real phone, we use an emulator.
If we have real phone, we connect it to USB port of the PC.
Then, it is shown as an arrow indicated.
Now, my phone is Cubot KingKong MINI2.
So, it showed the name of the phone.
The pixel 2 API30 is an emulator that I installed for testing.
After the phone is shown, if you click a green triangle button, the program
is automatically compiled and in the phone, the app is running.
When I click a green triangle button, app is running in an emulator.
And it is showing a red square button.
It means that the app is working in an emulator or real phone.
This is a normal act in the case of error free.
But, there can be some compile error or environment error, etc.
Then, you must get my help.
Here, I can’t mention all the cases.
Like this, you can test our apps.
Next, let’s consider the case of making the apk file.
In menu, there is a “Build” option.
There, you can make an apk file for sharing to another people.
If build is successfully completed, it is shown as an alert.
If you click “locate” letter, it indicates the position that the apk file exists.
When I click the “locate” letter, it showed the position of the apk file.
Also, we can go manually via the directory path.
From above screenshot, I think that you can know the apk file path.
2. How to make a simple modification of UI.
As I mentioned in the previous documents, some modification of UI is made
in xml file.
So, we must find out the xml file that we want to modify.
I explained already this, but, I will mention again.
Before, you said that “distance” and “bearing” font size is small.
So, I needed to modify this.
I will go through this example.
In main view(MainActivity), when we click map button or map button of
details, map is drawn.
So, we go to MainActivity file first.
We came to MainActivity file now.
If you click Ctrl+F key with keyboard, search box is shown.
In this search box, you input some keyword.
The keyword must be “onCreate”
It finds out “onCreate()” function.
In onCreate() function, You see this parameter savedInstanceState:Bundle?
This is a parameter made by system(android studio IDE).
So, you don’t need to consider it.
If I explain simply, “savedInstanceState” is a variable name made by the
system.
“Bundle” is data type.
“?” question mark means that it can be “null” value.
In this function, we find out setContentView() function.
The “setContentView” function receives xml file as parameter.
The xml file is just that we find.
It’s name is [Link].activity_main.
Please click the xml file.
Then, we can see xml part that we must modify.
Also, we can see preview window that monitors a change.
Here, we can see two “Textview”.
One textview defines distance and another defines bearing.
And it’s textSize is “48sp”.
We can make this bigger.
I made that as “72sp”.
I will run the app.
As you see, you can know that it has very big value.
I will return as original value.
As you see, like this, we can make some change of static UI in xml file.
In xml file, width, height, visible, invisible, fontsize, background color,
margin, padding, etc.
These properties are defined.
I mentioned simply so that you can understand.
Thanks.