blob: 24f3c360fd4c73721484c8c66d486c3532c5aee0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
<?xml version="1.0" encoding="utf-8"?>
<!--
* Tinc App, an Android binding and user interface for the tinc mesh VPN daemon
* Copyright (C) 2017-2020 Pacien TRAN-GIRARD
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="ftpEnabled"
type="boolean" />
<variable
name="ftpUsername"
type="String" />
<variable
name="ftpPassword"
type="String" />
<variable
name="ftpPort"
type="int" />
<variable
name="toggleFtpState"
type="kotlin.jvm.functions.Function0<kotlin.Unit>" />
</data>
<LinearLayout style="@style/AppTheme.List">
<LinearLayout
style="@style/AppTheme.ListBlock.Clickable"
android:onClick="@{() -> toggleFtpState.invoke()}"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
style="@style/AppTheme.BlockTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/configure_configuration_server_ftp_access" />
<TextView
style="@style/AppTheme.BlockContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{ftpEnabled ? @string/configure_configuration_server_ftp_access_endpoint_format(ftpUsername, ftpPassword, ftpPort) : @string/configure_configuration_server_ftp_access_not_active}"
android:textIsSelectable="@{ftpEnabled}" />
</LinearLayout>
<androidx.appcompat.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0"
android:checked="@{ftpEnabled}"
android:onClick="@{() -> toggleFtpState.invoke()}" />
</LinearLayout>
</LinearLayout>
</layout>
|