24 Interfaces and Delegation
119
1
2
xmlns:android="http://schemas.android.com/apk/res/android"
3
xmlns:tools="http://schemas.android.com/tools"
4
android:layout_width="match_parent"
5
android:layout_height="match_parent"
6
android:orientation="vertical">
7
8
9
10
11
android:layout_width="match_parent"
12
android:layout_height="wrap_content"
13
android:orientation="horizontal"
14
android:gravity="center_vertical"
15
android:paddingTop="@dimen/activity_vertical_margin"
16
android:paddingLeft="@dimen/activity_horizontal_margin"
17
android:paddingRight="@dimen/activity_horizontal_margin"
18
tools:ignore="UseCompoundDrawables">
19
....
20
21
22
The
toolbar
property is specified the same way.
DetailActivity
will initialise the toolbar too, set
the title and enable the up navigation icon:
1
override fun onCreate(savedInstanceState: Bundle?) {
2
super.onCreate(savedInstanceState);
3
setContentView(R.layout.activity_detail)
4
5
Do'stlaringiz bilan baham: