Skip to content

Commit 5747c69

Browse files
committed
Merge pull request #416 from fat-tire/fabs
Quick (not by any means final) materialization of buttons w/fabs/colors. Thanks to @gainan and @tux-mind for testing.. Hopefully it works for everyone.. if not, guess we'll fix it.
2 parents 62b530d + 7bbd294 commit 5747c69

19 files changed

+225
-197
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FFFFFFFF"
8+
android:pathData="M8,5v14l11,-7z"/>
9+
</vector>

cSploit/res/drawable/ic_stop_24dp.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FFFFFFFF"
8+
android:pathData="M6,6h12v12H6z"/>
9+
</vector>
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:layout_width="fill_parent"
4-
android:layout_height="fill_parent"
5-
android:padding="8dp"
6-
android:orientation="vertical">
3+
android:layout_width="fill_parent"
4+
android:layout_height="fill_parent"
5+
android:orientation="vertical"
6+
android:padding="8dp">
77

88
<ListView
9-
android:id="@android:id/list"
10-
android:layout_width="fill_parent"
11-
android:layout_height="0dp"
12-
android:layout_weight="1"/>
9+
android:id="@android:id/list"
10+
android:layout_width="fill_parent"
11+
android:layout_height="0dp"
12+
android:layout_weight="1" />
1313

1414
<Button
15-
android:id="@+id/btnChoose"
16-
android:layout_width="fill_parent"
17-
android:layout_height="wrap_content"
18-
android:textAllCaps="true"
19-
android:fontFamily="sans-serif-condensed"
20-
android:text="@string/choose"/>
15+
android:id="@+id/btnChoose"
16+
android:layout_width="fill_parent"
17+
android:layout_height="wrap_content"
18+
android:backgroundTint="@color/app_color"
19+
android:fontFamily="sans-serif-condensed"
20+
android:text="@string/choose"
21+
android:textAllCaps="true"
22+
android:textColor="@android:color/white" />
2123

2224
</LinearLayout>

cSploit/res/layout/file_edit.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
android:layout_alignParentLeft="true"
1414
android:layout_alignParentStart="true"
1515
android:layout_alignParentRight="true"
16-
android:layout_alignParentEnd="true" />
16+
android:layout_alignParentEnd="true"
17+
android:textColor="@android:color/white"
18+
android:backgroundTint="@color/app_color"/>
1719

1820
<EditText
1921
android:layout_width="wrap_content"

cSploit/res/layout/plugin_exploit_finder.xml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,36 @@
22
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
android:layout_width="fill_parent"
44
android:layout_height="fill_parent"
5-
android:orientation="vertical"
6-
android:padding="10dp">
5+
android:orientation="vertical">
76

8-
<ToggleButton
7+
<android.support.design.widget.FloatingActionButton
98
android:id="@+id/searchToggleButton"
109
android:layout_width="wrap_content"
1110
android:layout_height="wrap_content"
12-
android:fontFamily="sans-serif-condensed"
13-
android:paddingLeft="24dp"
14-
android:paddingRight="24dp"
15-
android:text="@string/toggle_button"
16-
android:textAllCaps="true"
17-
android:textOff="Start"
18-
android:textOn="Stop" />
11+
android:padding="20dp"
12+
android:src="@drawable/ic_play_arrow_24dp"
13+
android:checked="false"
14+
android:translationZ="8dp"
15+
android:layout_alignParentBottom="true"
16+
android:layout_alignParentRight="true"
17+
android:layout_margin="20dp" />
1918

2019
<ProgressBar
2120
android:id="@+id/searchActivity"
2221
android:layout_width="wrap_content"
2322
android:layout_height="wrap_content"
2423
android:layout_alignParentRight="true"
25-
android:layout_alignTop="@+id/searchToggleButton"
26-
android:visibility="invisible" />
27-
28-
<View
29-
android:id="@+id/separator"
30-
android:layout_width="fill_parent"
31-
android:layout_height="1dp"
32-
android:layout_below="@+id/searchToggleButton"
33-
android:layout_marginBottom="8dp"
34-
android:layout_marginTop="8dp"
35-
android:background="@android:color/darker_gray" />
24+
android:layout_alignParentTop="true"
25+
android:visibility="invisible"
26+
android:layout_margin="20dp" />
3627

3728
<ListView
3829
android:id="@id/android:list"
3930
android:layout_width="match_parent"
4031
android:layout_height="wrap_content"
4132
android:layout_alignParentBottom="true"
42-
android:layout_alignRight="@+id/searchActivity"
43-
android:layout_below="@+id/separator"
44-
android:animateLayoutChanges="true" />
33+
android:animateLayoutChanges="true"
34+
android:layout_marginLeft="16dp"
35+
android:layout_marginRight="16dp" />
4536

4637
</RelativeLayout>

cSploit/res/layout/plugin_inspector.xml

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,30 @@
33
android:layout_width="match_parent"
44
android:layout_height="match_parent"
55
android:paddingLeft="16sp"
6-
android:paddingRight="16sp"
76
android:paddingTop="16sp"
87
android:id="@+id/whatever">
98

10-
<ToggleButton
9+
<android.support.design.widget.FloatingActionButton
1110
android:id="@+id/inspectToggleButton"
1211
android:layout_width="wrap_content"
1312
android:layout_height="wrap_content"
14-
android:text="@string/toggle_button"
15-
android:textOff="Start"
16-
android:textOn="Stop"
17-
android:paddingLeft="24dp"
18-
android:paddingRight="24dp"
19-
android:textAllCaps="true"
20-
android:fontFamily="sans-serif-condensed" />
13+
android:padding="20dp"
14+
android:src="@drawable/ic_play_arrow_24dp"
15+
android:checked="false"
16+
android:translationZ="8dp"
17+
android:layout_alignParentBottom="true"
18+
android:layout_alignParentRight="true"
19+
android:layout_margin="20dp"
20+
android:focusableInTouchMode="true" />
2121

2222
<ProgressBar
2323
android:id="@+id/inspectActivity"
2424
android:layout_width="wrap_content"
2525
android:layout_height="wrap_content"
2626
android:layout_alignParentRight="true"
27-
android:layout_alignTop="@+id/inspectToggleButton"
28-
android:visibility="invisible" />
29-
30-
<View
31-
android:id="@+id/separator"
32-
android:layout_width="fill_parent"
33-
android:layout_height="1dp"
34-
android:layout_below="@+id/inspectToggleButton"
35-
android:layout_marginTop="8dp"
36-
android:layout_marginBottom="8dp"
37-
android:background="@android:color/darker_gray" />
27+
android:layout_alignParentTop="false"
28+
android:visibility="invisible"
29+
android:layout_margin="20dp" />
3830

3931
<TextView
4032
android:id="@+id/deviceTypeLabel"
@@ -78,7 +70,8 @@
7870
android:layout_above="@+id/textView2"
7971
android:layout_alignRight="@+id/inspectActivity"
8072
android:layout_alignTop="@+id/deviceTypeLabel"
81-
android:layout_toRightOf="@+id/deviceTypeLabel">
73+
android:layout_toRightOf="@+id/deviceTypeLabel"
74+
android:layout_marginRight="16dp">
8275

8376
<TextView
8477
android:id="@+id/deviceType"
@@ -97,7 +90,8 @@
9790
android:layout_alignBottom="@+id/textView2"
9891
android:layout_alignLeft="@+id/ScrollView03"
9992
android:layout_alignRight="@+id/ScrollView03"
100-
android:layout_below="@+id/ScrollView03">
93+
android:layout_below="@+id/ScrollView03"
94+
android:layout_marginRight="16dp">
10195

10296
<TextView
10397
android:id="@+id/deviceOS"
@@ -110,14 +104,19 @@
110104
</ScrollView>
111105

112106
<ScrollView
107+
android:descendantFocusability="afterDescendants"
108+
android:focusableInTouchMode="false"
113109
android:id="@+id/ScrollView01"
114110
android:layout_width="fill_parent"
115111
android:layout_height="fill_parent"
116112
android:layout_alignLeft="@+id/textView3"
117113
android:layout_alignParentBottom="true"
118-
android:layout_below="@+id/textView3">
114+
android:layout_below="@+id/textView3"
115+
android:layout_marginRight="16dp">
119116

120117
<TextView
118+
android:fillViewport="true"
119+
android:focusableInTouchMode="true"
121120
android:id="@+id/deviceServices"
122121
android:layout_width="fill_parent"
123122
android:layout_height="wrap_content"
@@ -131,25 +130,30 @@
131130
android:layout_width="wrap_content"
132131
android:layout_height="wrap_content"
133132
android:layout_alignLeft="@+id/deviceTypeLabel"
134-
android:layout_toLeftOf="@+id/deviceName"
133+
android:layout_toLeftOf="@+id/scrollview4"
135134
android:fontFamily="sans-serif-condensed"
136135
android:text="@string/target"
137136
android:textColor="@color/app_color"
138-
android:textAppearance="?android:attr/textAppearanceMedium"
139-
android:layout_below="@+id/separator" />
137+
android:textAppearance="?android:attr/textAppearanceMedium" />
140138

141-
<TextView
142-
android:id="@+id/deviceName"
143-
android:layout_width="wrap_content"
139+
<ScrollView
140+
android:layout_width="match_parent"
144141
android:layout_height="wrap_content"
145142
android:layout_above="@+id/ScrollView03"
146143
android:layout_alignLeft="@+id/ScrollView03"
147144
android:layout_alignRight="@+id/ScrollView03"
148145
android:layout_alignTop="@+id/textView1"
149146
android:paddingLeft="16dp"
147+
android:id="@+id/scrollview4"
148+
android:layout_marginRight="16dp" >
149+
<TextView
150+
android:id="@+id/deviceName"
151+
android:layout_width="wrap_content"
152+
android:layout_height="wrap_content"
153+
150154
android:text="@string/target"
151155
android:textAppearance="?android:attr/textAppearanceSmall"
152-
android:layout_below="@+id/separator"
153-
android:gravity="center_vertical" />
154-
156+
android:gravity="center_vertical"
157+
/>
158+
</ScrollView>
155159
</RelativeLayout>

cSploit/res/layout/plugin_login_cracker.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,7 @@
171171
android:layout_alignParentBottom="true"
172172
android:layout_alignRight="@+id/linearLayout6">
173173

174-
<ToggleButton
175-
android:id="@+id/startButton"
176-
android:layout_width="wrap_content"
177-
android:layout_height="wrap_content"
178-
android:textOff="@string/start"
179-
android:textOn="@string/stop"
180-
android:paddingLeft="24dp"
181-
android:paddingRight="24dp"
182-
android:textAllCaps="true"
183-
android:fontFamily="sans-serif-condensed"/>
174+
184175

185176
<RelativeLayout
186177
android:layout_width="fill_parent"
@@ -216,6 +207,17 @@
216207

217208
</RelativeLayout>
218209
</LinearLayout>
219-
210+
<android.support.design.widget.FloatingActionButton
211+
android:id="@+id/startFAB"
212+
android:layout_width="wrap_content"
213+
android:layout_height="wrap_content"
214+
android:padding="20dp"
215+
android:src="@drawable/ic_play_arrow_24dp"
216+
android:translationZ="8dp"
217+
android:layout_margin="20dp"
218+
android:layout_alignParentEnd="false"
219+
android:layout_alignParentBottom="true"
220+
android:layout_alignParentTop="false"
221+
android:layout_alignParentRight="true" />
220222
</RelativeLayout>
221223

0 commit comments

Comments
 (0)