<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright © 2013 – 2016 Ricki Hirner (bitfire web engineering).
  ~ All rights reserved. This program and the accompanying materials
  ~ are made available under the terms of the GNU Public License v3.0
  ~ which accompanies this distribution, and is available at
  ~ http://www.gnu.org/licenses/gpl.html
  -->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="@dimen/activity_margin">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/calendar_permissions"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginBottom="16dp"
            tools:ignore="UselessParent">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                style="@style/TextView.Heading"
                android:text="@string/permissions_calendar"/>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/permissions_calendar_details"/>

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/permissions_calendar_request"
                android:onClick="requestCalendarPermissions"/>

        </LinearLayout>

        <LinearLayout
            android:id="@+id/contacts_permissions"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginBottom="16dp"
            tools:ignore="UselessParent">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                style="@style/TextView.Heading"
                android:text="@string/permissions_contacts"/>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/permissions_contacts_details"/>

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/permissions_contacts_request"
                android:onClick="requestContactsPermissions"/>

        </LinearLayout>

        <LinearLayout
            android:id="@+id/opentasks_permissions"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            tools:ignore="UselessParent">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                style="@style/TextView.Heading"
                android:text="@string/permissions_opentasks"/>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/permissions_opentasks_details"/>

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/permissions_opentasks_request"
                android:onClick="requestOpenTasksPermissions"/>

        </LinearLayout>

    </LinearLayout>

</ScrollView>