Skip to content

Commit 73c6bd6

Browse files
author
dkostryukov
committed
Redesign share dialog
1 parent b276468 commit 73c6bd6

33 files changed

+131
-146
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For example, your gradle script will contains such dependencies:
5555
dependencies {
5656
compile fileTree(dir: 'libs', include: ['*.jar'])
5757
compile 'com.android.support:appcompat-v7:20.0.0'
58-
compile 'com.vk:androidsdk:1.6.8'
58+
compile 'com.vk:androidsdk:1.6.9'
5959
}
6060
```
6161

VKTestApplication/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ android {
3838
dependencies {
3939
compile 'com.android.support:appcompat-v7:25.1.0'
4040
compile fileTree(dir: 'libs', include: ['*.jar'])
41-
// compile 'com.vk:androidsdk:1.6.8'
41+
// compile 'com.vk:androidsdk:1.6.9'
4242
compile project(':vksdk_library')
4343
}

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION_NAME=1.6.8
1+
VERSION_NAME=1.6.9
22
VERSION_CODE=1
33
GROUP=com.vk
44

vksdk_library/src/main/java/com/vk/sdk/VKSdkVersion.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
* Contains SDK versions constants
2626
*/
2727
public class VKSdkVersion {
28-
public static final String SDK_VERSION = "1.6.8";
28+
public static final String SDK_VERSION = "1.6.9";
2929
static final String DEFAULT_API_VERSION = "5.21";
3030
}

vksdk_library/src/main/java/com/vk/sdk/dialogs/VKShareDialogDelegate.java

+6
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
137137

138138
assert mInternalView != null;
139139

140+
mInternalView.findViewById(R.id.close_btn).setOnClickListener(new View.OnClickListener() {
141+
@Override
142+
public void onClick(View v) {
143+
dialogFragmentI.dismissAllowingStateLoss();
144+
}
145+
});
140146
mSendButton = (Button) mInternalView.findViewById(R.id.sendButton);
141147
mSendProgress = (ProgressBar) mInternalView.findViewById(R.id.sendProgress);
142148
mPhotoLayout = (LinearLayout) mInternalView.findViewById(R.id.imagesContainer);
Loading
Loading
Binary file not shown.
Loading
Loading
Loading
Binary file not shown.
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading
Binary file not shown.
Loading
Loading
Loading
Binary file not shown.
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,46 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<RelativeLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
34
xmlns:tools="http://schemas.android.com/tools"
45
android:layout_width="match_parent"
56
android:layout_height="wrap_content"
67
android:layout_centerInParent="true"
78
android:layout_gravity="center"
89
android:orientation="vertical"
10+
tools:context="com.vk.sdk.dialogs.VKShareDialog"
11+
tools:ignore="RtlHardcoded">
912

10-
tools:context="com.vk.sdk.dialogs.VKShareDialog">
1113
<View
1214
android:layout_width="0dp"
1315
android:layout_height="0dp"
1416
android:focusable="true"
15-
android:focusableInTouchMode="true" />
17+
android:focusableInTouchMode="true"/>
1618

17-
<RelativeLayout
19+
<FrameLayout
1820
android:id="@+id/topBarLayout"
1921
android:layout_width="match_parent"
2022
android:layout_height="@dimen/vk_share_top_panel_height"
2123
android:background="@color/vk_share_top_blue_color">
2224

23-
<LinearLayout
24-
android:layout_width="match_parent"
25-
android:layout_height="match_parent"
26-
android:layout_alignParentStart="true"
27-
android:layout_toStartOf="@+id/sendButtonLayout">
28-
29-
<ImageView
30-
android:layout_width="wrap_content"
31-
android:layout_height="match_parent"
32-
android:layout_marginStart="@dimen/vk_share_top_image_margin"
33-
android:scaleType="fitCenter"
34-
android:src="@drawable/ic_ab_app"
35-
android:contentDescription="@string/vk_name"/>
36-
37-
<TextView
38-
android:layout_width="match_parent"
39-
android:layout_height="match_parent"
40-
android:layout_marginStart="@dimen/vk_share_top_title_margin"
41-
android:gravity="center_vertical"
42-
android:text="@string/vk_share"
43-
android:textColor="@color/vk_white"
44-
android:textSize="@dimen/vk_share_title_text_size" />
45-
</LinearLayout>
25+
<ImageButton
26+
android:id="@+id/close_btn"
27+
android:layout_width="@dimen/vk_share_top_panel_height"
28+
android:layout_height="@dimen/vk_share_top_panel_height"
29+
android:background="@null"
30+
android:src="@drawable/ic_close_white_24dp"/>
4631

47-
<LinearLayout
48-
android:id="@+id/sendButtonLayout"
32+
<ImageView
4933
android:layout_width="wrap_content"
5034
android:layout_height="wrap_content"
51-
android:layout_alignParentEnd="true">
35+
android:layout_gravity="center"
36+
android:contentDescription="@string/vk_name"
37+
android:scaleType="fitCenter"
38+
android:src="@drawable/ic_ab_app"/>
5239

53-
<View
54-
android:layout_width="1dp"
55-
android:layout_height="match_parent"
56-
android:layout_margin="@dimen/vk_share_top_line_margin"
57-
android:background="#3fff" />
58-
59-
<ProgressBar
60-
android:id="@+id/sendProgress"
61-
android:layout_width="wrap_content"
62-
android:layout_height="match_parent"
63-
android:indeterminate="true"
64-
android:visibility="gone" />
65-
66-
<Button
67-
android:id="@+id/sendButton"
68-
android:layout_width="wrap_content"
69-
android:layout_height="match_parent"
70-
android:background="@drawable/vk_share_send_button_background"
71-
android:drawableStart="@drawable/ic_ab_done"
72-
android:drawablePadding="3dp"
73-
android:paddingStart="@dimen/vk_share_top_button_padding_left"
74-
android:paddingEnd="@dimen/vk_share_top_button_padding_right"
75-
android:text="@string/vk_send"
76-
android:textAllCaps="true"
77-
android:textColor="@color/vk_white"
78-
android:textSize="@dimen/vk_share_send_text_size"
79-
android:textStyle="bold" />
80-
</LinearLayout>
81-
82-
</RelativeLayout>
40+
</FrameLayout>
8341

8442
<LinearLayout
43+
android:id="@+id/postContent"
8544
android:layout_width="match_parent"
8645
android:layout_height="wrap_content"
8746
android:layout_below="@+id/topBarLayout"
@@ -113,7 +72,7 @@
11372
android:inputType="textCapSentences|textMultiLine"
11473
android:textColor="@color/vk_black"
11574
android:textColorHint="@color/vk_share_link_color"
116-
android:textSize="@dimen/vk_share_title_text_size" />
75+
android:textSize="@dimen/vk_share_title_text_size"/>
11776

11877
<HorizontalScrollView
11978
android:id="@+id/imagesScrollView"
@@ -125,7 +84,7 @@
12584
android:id="@+id/imagesContainer"
12685
android:layout_width="wrap_content"
12786
android:layout_height="match_parent"
128-
android:orientation="horizontal" />
87+
android:orientation="horizontal"/>
12988
</HorizontalScrollView>
13089

13190
<LinearLayout
@@ -144,7 +103,7 @@
144103
android:ellipsize="end"
145104
android:lines="1"
146105
android:textColor="@color/vk_share_link_title_color"
147-
android:textSize="@dimen/vk_share_title_link_title_size" />
106+
android:textSize="@dimen/vk_share_title_link_title_size"/>
148107

149108
<TextView
150109
android:id="@+id/linkHost"
@@ -154,7 +113,7 @@
154113
android:ellipsize="end"
155114
android:lines="1"
156115
android:textColor="@color/vk_share_link_color"
157-
android:textSize="@dimen/vk_share_title_link_host_size" />
116+
android:textSize="@dimen/vk_share_title_link_host_size"/>
158117
</LinearLayout>
159118
</LinearLayout>
160119
</ScrollView>
@@ -172,14 +131,46 @@
172131
android:layout_height="1dp"
173132
android:layout_marginLeft="@dimen/vk_share_dialog_padding"
174133
android:layout_marginRight="@dimen/vk_share_dialog_padding"
175-
android:background="@color/vk_share_gray_line" />
134+
android:background="@color/vk_share_gray_line"/>
176135

177136
<Button
178137
android:layout_width="match_parent"
179138
android:layout_height="wrap_content"
180139
android:background="@drawable/vk_share_send_button_background"
181140
android:text="@string/vk_new_post_settings"
182-
android:textColor="@color/vk_share_blue_color" />
141+
android:textColor="@color/vk_share_blue_color"/>
183142
</LinearLayout>
184143
</LinearLayout>
144+
145+
<LinearLayout
146+
android:id="@+id/sendButtonLayout"
147+
android:layout_width="match_parent"
148+
android:layout_height="48dp"
149+
android:layout_below="@+id/postContent"
150+
android:background="@color/vk_share_top_blue_color"
151+
android:gravity="center">
152+
153+
<ProgressBar
154+
android:id="@+id/sendProgress"
155+
android:layout_width="wrap_content"
156+
android:layout_height="wrap_content"
157+
android:indeterminate="true"
158+
android:visibility="gone"/>
159+
160+
<Button
161+
android:id="@+id/sendButton"
162+
android:layout_width="wrap_content"
163+
android:layout_height="match_parent"
164+
android:background="@drawable/vk_share_send_button_background"
165+
android:fontFamily="sans-serif-medium"
166+
android:text="@string/vk_send"
167+
android:textColor="@color/vk_white"
168+
android:textSize="@dimen/vk_share_send_text_size"/>
169+
</LinearLayout>
170+
171+
<View
172+
android:layout_width="match_parent"
173+
android:layout_height="12dp"
174+
android:layout_below="@+id/topBarLayout"
175+
android:background="@drawable/bg_toolbar_shadow_dark"/>
185176
</RelativeLayout>

0 commit comments

Comments
 (0)