Lab 4a - Simple User Interface Layout
Lab 4a - Simple User Interface Layout
Sem. II 2019/2020
Lab Exercise 4a: Simple User Interface
PART I
Step III: Open string.xml and change its content as following specification:
In this file, several new strings being defined that we can use for the text in the user
interface that we design next.
It is very easy to replace these string values with other values to reconfigure the
application user interface without needing to change any code.
Step IV: Copy and paste fsktmlogo.jpg and SKR4307.png into /res/drawable
folder.
1
Step V: Configuring the activity_main.xml layout file
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
2
/>
</LinearLayout>
</LinearLayout>
package com.example.skr4307;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
3
setContentView(R.layout.activity_main);
}
}