Skip to content

Commit 98aba03

Browse files
committed
droneshare account ui update.
1 parent 2a7f1a1 commit 98aba03

File tree

13 files changed

+169
-57
lines changed

13 files changed

+169
-57
lines changed

Android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies {
1111
compile 'com.android.support:cardview-v7:21.0.2'
1212
compile 'com.android.support:recyclerview-v7:21.0.2'
1313

14-
compile 'com.o3dr:3dr-services-lib:2.2.7'
14+
compile 'com.o3dr:3dr-services-lib:2.2.8'
1515

1616
compile files('libs/droneapi-java-0.3-SNAPSHOT.jar')
1717
compile files('libs/j2xx.jar')
@@ -28,7 +28,7 @@ android {
2828
applicationId 'org.droidplanner.android'
2929
minSdkVersion 14
3030
targetSdkVersion 21
31-
versionCode 30101
31+
versionCode 30102
3232
versionName getGitVersion()
3333
}
3434

325 Bytes
Loading
267 Bytes
Loading
361 Bytes
Loading
449 Bytes
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:drawable="@color/light_grey" android:state_pressed="true" />
4+
</selector>

Android/res/layout/fragment_droneshare_account.xml

Lines changed: 91 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,101 @@
55
android:layout_width="match_parent"
66
android:layout_height="match_parent">
77

8-
<ImageView
9-
android:id="@+id/account_image"
10-
android:layout_margin="10dp"
11-
android:layout_height="100dp"
12-
android:layout_width="100dp"
13-
android:layout_alignParentTop="true"
14-
android:layout_alignParentLeft="true"
15-
android:layout_alignParentStart="true"
16-
android:visibility="invisible"
17-
android:src="@drawable/ic_account_circle_grey600_48dp"/>
18-
19-
<TextView
8+
<android.support.v7.widget.CardView
9+
android:id="@+id/user_info_card"
2010
android:layout_width="match_parent"
2111
android:layout_height="wrap_content"
22-
android:layout_toRightOf="@+id/account_image"
23-
android:layout_toEndOf="@+id/account_image"
24-
android:layout_alignTop="@+id/account_image"
25-
android:layout_alignBottom="@+id/account_image"
12+
android:layout_marginTop="10dp"
2613
android:layout_marginLeft="10dp"
27-
android:layout_marginStart="10dp"
28-
android:gravity="center_vertical"
29-
android:textSize="30sp"
30-
android:id="@+id/dshare_username"
31-
tools:text="ne0fhyk"/>
32-
33-
<android.support.v7.widget.RecyclerView
34-
android:layout_below="@+id/account_image"
14+
android:layout_marginRight="10dp"
15+
android:layout_marginBottom="5dp">
16+
17+
<RelativeLayout
18+
android:id="@+id/user_info_container"
19+
android:layout_width="match_parent"
20+
android:layout_height="wrap_content"
21+
android:gravity="center_vertical"
22+
android:background="@drawable/clickable_bg"
23+
>
24+
25+
<ImageView
26+
android:id="@+id/account_image"
27+
android:layout_margin="10dp"
28+
android:layout_height="70dp"
29+
android:layout_width="70dp"
30+
android:layout_alignParentTop="true"
31+
android:layout_alignParentLeft="true"
32+
android:layout_alignParentStart="true"
33+
android:visibility="visible"
34+
android:src="@drawable/ic_account_circle_grey600_48dp"/>
35+
36+
<TextView
37+
android:layout_width="match_parent"
38+
android:layout_height="wrap_content"
39+
android:layout_toRightOf="@+id/account_image"
40+
android:layout_toEndOf="@+id/account_image"
41+
android:layout_marginTop="15dp"
42+
android:gravity="center_vertical"
43+
android:textSize="30sp"
44+
android:id="@+id/dshare_username"
45+
tools:text="ne0fhyk"/>
46+
47+
<TextView
48+
android:id="@+id/dshare_user_url"
49+
android:layout_width="match_parent"
50+
android:layout_height="wrap_content"
51+
android:layout_below="@+id/dshare_username"
52+
android:layout_alignStart="@+id/dshare_username"
53+
android:layout_alignLeft="@+id/dshare_username"
54+
tools:text="http://www.droneshare.com/user/test"/>
55+
</RelativeLayout>
56+
</android.support.v7.widget.CardView>
57+
58+
<android.support.v7.widget.CardView
59+
android:layout_below="@+id/user_info_card"
3560
android:layout_width="match_parent"
3661
android:layout_height="match_parent"
37-
android:id="@+id/user_vehicles_list"
38-
android:fadeScrollbars="true"/>
62+
android:layout_marginBottom="10dp"
63+
android:layout_marginTop="5dp"
64+
android:layout_marginLeft="10dp"
65+
android:layout_marginRight="10dp">
66+
67+
<LinearLayout
68+
android:layout_width="match_parent"
69+
android:layout_height="match_parent"
70+
android:orientation="vertical">
71+
72+
<TextView
73+
style="?android:attr/textAppearanceLarge"
74+
android:text="@string/label_vehicle_details"
75+
android:layout_width="match_parent"
76+
android:layout_height="wrap_content"
77+
android:textColor="@color/dark_grey"
78+
android:padding="15dp"/>
79+
80+
<View
81+
android:layout_width="match_parent"
82+
android:layout_height="2dp"
83+
android:background="@color/light_grey"
84+
android:layout_marginBottom="10dp"
85+
/>
86+
87+
<android.support.v7.widget.RecyclerView
88+
android:layout_width="match_parent"
89+
android:layout_height="match_parent"
90+
android:id="@+id/user_vehicles_list"
91+
android:scrollbars="vertical"
92+
android:scrollbarStyle="insideInset"
93+
/>
94+
</LinearLayout>
95+
96+
<org.droidplanner.android.widgets.NiceProgressView
97+
android:layout_width="wrap_content"
98+
android:layout_height="wrap_content"
99+
android:layout_gravity="center"
100+
android:id="@+id/vehicle_loading_progress"
101+
android:visibility="gone"
102+
style="?android:progressBarStyleLarge"/>
103+
</android.support.v7.widget.CardView>
39104

40105
</RelativeLayout>

Android/res/layout/droneshare_account.xml renamed to Android/res/layout/fragment_droneshare_login.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
android:minWidth="250dp"
7777
android:minHeight="56dp"
7878
android:background="@drawable/signup_button_bg"
79+
android:textColor="@android:color/white"
7980
android:layout_marginTop="20dp"
8081
android:text="@string/label_sign_up"
8182
android:textAllCaps="true"/>
@@ -110,6 +111,7 @@
110111
android:background="@drawable/login_button_bg"
111112
android:layout_marginTop="20dp"
112113
android:text="@string/label_login"
114+
android:textColor="@android:color/white"
113115
android:textAllCaps="true"/>
114116

115117
<TextView

Android/res/layout/list_item_vehicle_info.xml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,23 @@
1111
android:layout_height="wrap_content"
1212
android:orientation="vertical"
1313
>
14-
<TextView
15-
android:id="@+id/vehicle_name"
16-
android:layout_width="match_parent"
17-
android:layout_height="wrap_content"
18-
android:padding="15dp"
19-
tools:text="quadcopter"
20-
android:gravity="center"
21-
android:textSize="20sp"
22-
android:minHeight="64dp"/>
14+
15+
<TextView
16+
android:id="@+id/vehicle_name"
17+
android:layout_width="match_parent"
18+
android:layout_height="wrap_content"
19+
style="?android:attr/borderlessButtonStyle"
20+
android:padding="15dp"
21+
tools:text="quadcopter"
22+
android:layout_gravity="center"
23+
android:gravity="center"
24+
android:textSize="20sp"
25+
android:textAllCaps="false"
26+
android:textColor="@color/dark_grey"
27+
android:drawableEnd="@drawable/ic_open_in_new_grey600_18dp"
28+
android:drawableRight="@drawable/ic_open_in_new_grey600_18dp"
29+
android:drawablePadding="10dp"
30+
android:minHeight="64dp"/>
2331

2432
<View
2533
android:layout_width="match_parent"

Android/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,5 +536,6 @@
536536
<string name="label_mission_item_type_no_selection">No available option</string>
537537
<string name="description_mission_item_type_selection">Click on the spinner to select a type for the selected waypoints.</string>
538538
<string name="description_mission_item_type_no_selection">No type option is available for the selected items.</string>
539+
<string name="label_vehicle_details">Vehicle details</string>
539540

540541
</resources>

0 commit comments

Comments
 (0)