activity_main.xml 2.03 KB
Newer Older
HashikD's avatar
HashikD committed
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
HashikD's avatar
HashikD committed
3
4
5
6
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
HashikD's avatar
HashikD committed
7
    android:background="@color/colorPrimary"
HashikD's avatar
HashikD committed
8
9
    tools:context=".MainActivity">

HashikD's avatar
HashikD committed
10
11
12
    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
HashikD's avatar
HashikD committed
13
        android:layout_height="56dp"
HashikD's avatar
HashikD committed
14
15
16
17
        android:background="@color/colorPrimary"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        app:layout_constraintTop_toTopOf="parent">

HashikD's avatar
HashikD committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <TextView
                android:id="@+id/toolbar_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:text="@string/app_name"
                android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
                android:textColor="@android:color/white"
                android:textSize="16sp" />

            <androidx.appcompat.widget.AppCompatButton
33
                android:id="@+id/settings_button"
HashikD's avatar
HashikD committed
34
35
36
37
38
39
40
41
                android:layout_width="25dp"
                android:layout_height="25dp"
                android:layout_alignParentEnd="true"
                android:layout_centerVertical="true"
                android:layout_marginEnd="5dp"
                android:background="@drawable/ic_baseline_settings"
                android:foreground="?android:attr/selectableItemBackground" />
        </RelativeLayout>
HashikD's avatar
HashikD committed
42
    </androidx.appcompat.widget.Toolbar>
43
44

    <FrameLayout
45
        android:id="@+id/fragment_container"
46
47
        android:layout_width="match_parent"
        android:layout_height="match_parent"
48
49
        android:layout_below="@id/toolbar" />
</RelativeLayout>