Obliczenia brydżowe (Android)
Jacek Kowalski
2014-03-09 b20e6dff6ddf1755318841718e5dca6b757c259f
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
        >
    <LinearLayout
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent" android:layout_margin="10dp">
        <SeekBar
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/BidSlider" android:max="7" android:indeterminate="false"
                />
        <LinearLayout
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" android:gravity="center_vertical" android:weightSum="1"
                >
            <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textAppearance="?android:attr/textAppearanceLarge"
                    android:text="0"
                    android:id="@+id/BidText" android:layout_weight="0.25" android:textAlignment="gravity"
                    android:layout_gravity="center"/>
            <ToggleButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/clubs_or_diamonds"
                    android:id="@+id/CDToggle" android:textOff="@string/clubs_or_diamonds"
                    android:textOn="@string/clubs_or_diamonds" android:checked="true" android:layout_weight="0.25"/>
            <ToggleButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/hearts_or_spades"
                    android:id="@+id/HSToggle" android:textOff="@string/hearts_or_spades"
                    android:textOn="@string/hearts_or_spades" android:layout_weight="0.25" android:checked="false"/>
            <ToggleButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/no_trumph"
                    android:id="@+id/NTToggle" android:textOff="@string/no_trumph"
                    android:textOn="@string/no_trumph" android:layout_weight="0.25" android:checked="false"/>
        </LinearLayout>
        <LinearLayout
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            <ToggleButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/bid_normal"
                    android:id="@+id/NormToggle" android:textOff="@string/bid_normal"
                    android:textOn="@string/bid_normal" android:checked="true" android:layout_weight="1"/>
            <ToggleButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/bid_double"
                    android:id="@+id/DblToggle" android:textOff="@string/bid_double"
                    android:textOn="@string/bid_double" android:layout_weight="1" android:checked="false"/>
            <ToggleButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/bid_redouble"
                    android:id="@+id/ReDblToggle" android:textOff="@string/bid_redouble"
                    android:textOn="@string/bid_redouble" android:layout_weight="1" android:checked="false"/>
        </LinearLayout>
        <LinearLayout
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            <ToggleButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/before_before"
                    android:id="@+id/BBToggle" android:textOff="@string/before_before"
                    android:textOn="@string/before_before" android:layout_weight="1" android:checked="true"/>
            <ToggleButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/before_after"
                    android:id="@+id/BAToggle" android:textOff="@string/before_after"
                    android:textOn="@string/before_after" android:layout_weight="1" android:checked="false"/>
            <ToggleButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/after_before"
                    android:id="@+id/ABToggle" android:textOff="@string/after_before"
                    android:textOn="@string/after_before" android:layout_weight="1" android:checked="false"/>
            <ToggleButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/after_after"
                    android:id="@+id/AAToggle" android:textOff="@string/after_after"
                    android:textOn="@string/after_after" android:layout_weight="1" android:checked="false"/>
        </LinearLayout>
        <LinearLayout
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textAppearance="?android:attr/textAppearanceLarge"
                    android:text="@string/pc"
                    android:id="@+id/PCText" android:labelFor="@+id/PCInput" android:layout_marginRight="10dp"/>
            <EditText
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:inputType="number"
                    android:id="@+id/PCInput" android:editable="false" android:ems="4"/>
            <Space
                    android:layout_width="20dp"
                    android:layout_height="wrap_content"
                    />
            <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textAppearance="?android:attr/textAppearanceLarge"
                    android:text="@string/tricks"
                    android:id="@+id/TricksText" android:labelFor="@+id/TricksInput" android:layout_marginRight="10dp"/>
            <EditText
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:inputType="number"
                    android:id="@+id/TricksInput" android:ems="4"/>
        </LinearLayout>
        <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:id="@+id/resultText" android:text="@string/invalid_empty" android:layout_marginTop="10dp"/>
    </LinearLayout>
</LinearLayout>