Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
dc0ed428
Commit
dc0ed428
authored
Sep 26, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-video' of
http://113.105.137.151:22280/lify/rvapp
into dev_im
# Conflicts: # RvClient/build.gradle
parents
558d86c3
358e4c5c
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
243 additions
and
137 deletions
+243
-137
build.gradle
RvClient/build.gradle
+2
-2
RvClientApplication.java
RvClient/src/main/java/com/xxfc/rv/RvClientApplication.java
+1
-1
RegisteredActivity.java
...va/com/rv/home/rv/module/ui/login/RegisteredActivity.java
+78
-10
rv_act_registered.xml
module_home/src/main/res/layout/rv_act_registered.xml
+83
-57
strings.xml
module_home/src/main/res/values/strings.xml
+1
-1
activity_travel_details.xml
...e_tourism/src/main/res/layout/activity_travel_details.xml
+40
-43
CarPosterActivity.java
...src/main/java/com/rv/poster/plugin/CarPosterActivity.java
+11
-9
PosterActivity.java
...er/src/main/java/com/rv/poster/plugin/PosterActivity.java
+19
-10
activity_carposter.xml
plugin_poster/src/main/res/layout/activity_carposter.xml
+1
-0
activity_poster.xml
plugin_poster/src/main/res/layout/activity_poster.xml
+3
-2
activity_reative_bill.xml
plugin_share/src/main/res/layout/activity_reative_bill.xml
+4
-2
No files found.
RvClient/build.gradle
View file @
dc0ed428
...
...
@@ -8,8 +8,8 @@ android {
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
flavorDimensions
"default"
versionCode
1
45
versionName
"1.
4.5
"
versionCode
1
52
versionName
"1.
5.2
"
multiDexEnabled
true
...
...
RvClient/src/main/java/com/xxfc/rv/RvClientApplication.java
View file @
dc0ed428
...
...
@@ -50,7 +50,7 @@ import me.jessyan.autosize.onAdaptListener;
public
class
RvClientApplication
extends
FrameApp
{
final
public
static
String
token
=
"eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxMzc2NjY2NjY2NiIsInVzZXJJZCI6IjE1IiwicmVxdWVzdFR5cGUiOiJBUFAiLCJleHAiOjE1NTk4MDU4Mjd9.NAzU25an3hqrbQI2dsroONtckMmQZRUikqBXxThGRQb578Adq7lQKM-jPw2ViCuXUcGuNRPG47d1hCzyRZH_-8nkG2ls7F0zRMATbcWIL0fozLKS4puMYT_I359JIdp_a6onEmfX0RMunupp0tbRlrbdaVLIIXIvA4nU8b_b4Rc"
;
//ARouter 调试开关
private
boolean
isDedugARouter
=
tru
e
;
private
boolean
isDedugARouter
=
fals
e
;
@Override
public
void
onCreate
()
{
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/login/RegisteredActivity.java
View file @
dc0ed428
...
...
@@ -4,9 +4,13 @@ import android.content.Context;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.SpannableStringBuilder
;
import
android.text.TextPaint
;
import
android.text.TextUtils
;
import
android.text.method.HideReturnsTransformationMethod
;
import
android.text.method.LinkMovementMethod
;
import
android.text.method.PasswordTransformationMethod
;
import
android.text.style.ClickableSpan
;
import
android.view.View
;
import
android.widget.CheckBox
;
import
android.widget.EditText
;
...
...
@@ -17,17 +21,16 @@ import com.alibaba.android.arouter.launcher.ARouter;
import
com.frame.base.url.Constance
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.ruiwenliu.wrapper.bean.BeanUserInfo
;
import
com.ruiwenliu.wrapper.util.RxJavaManager
;
import
com.ruiwenliu.wrapper.util.listener.TextChangedListener
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.component.utils.AppCookie
;
import
com.rv.component.utils.Cookie
;
import
com.rv.home.R
;
import
com.rv.home.R2
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.basic.BaseLoginActivity
;
import
com.ruiwenliu.wrapper.bean.BeanUserInfo
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.rv.home.rv.module.ui.login.bean.RegisteredBean
;
import
com.rv.home.rv.module.ui.login.bean.SendCodeBean
;
import
com.umeng.socialize.bean.SHARE_MEDIA
;
...
...
@@ -36,6 +39,7 @@ import java.util.LinkedHashMap;
import
java.util.Map
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
io.reactivex.Observer
;
import
io.reactivex.disposables.Disposable
;
...
...
@@ -102,6 +106,61 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
editListener
(
etPhoneCode
);
editListener
(
etPwd
);
editListener
(
etAgainPwd
);
initData
();
}
private
void
initData
()
{
String
str
=
"注册即表示同意滴房车《用户协议》和《隐私政策》"
;
SpannableStringBuilder
ssb
=
new
SpannableStringBuilder
();
ssb
.
append
(
str
);
final
int
start
=
str
.
indexOf
(
"《"
);
//第一个出现的位置
ssb
.
setSpan
(
new
ClickableSpan
()
{
@Override
public
void
onClick
(
View
widget
)
{
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_WEBVIEW
)
.
withString
(
"title"
,
"用户协议"
)
.
withString
(
"url"
,
ApiConfig
.
HTTP_URL_CAR_TYPE_NOTICE
)
.
withInt
(
"type"
,
15
)
.
navigation
();
}
@Override
public
void
updateDrawState
(
TextPaint
ds
)
{
super
.
updateDrawState
(
ds
);
ds
.
setColor
(
getResources
().
getColor
(
R
.
color
.
gray_FFB74B
));
//设置文件颜色
// 去掉下划线
ds
.
setUnderlineText
(
false
);
}
},
start
,
start
+
6
,
0
);
final
int
end
=
str
.
lastIndexOf
(
"《"
);
//最后一个出现的位置
ssb
.
setSpan
(
new
ClickableSpan
()
{
@Override
public
void
onClick
(
View
widget
)
{
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_WEBVIEW
)
.
withString
(
"title"
,
"隐私政策"
)
.
withString
(
"url"
,
ApiConfig
.
HTTP_URL_CAR_TYPE_NOTICE
)
.
withInt
(
"type"
,
19
)
.
navigation
();
}
@Override
public
void
updateDrawState
(
TextPaint
ds
)
{
super
.
updateDrawState
(
ds
);
ds
.
setColor
(
getResources
().
getColor
(
R
.
color
.
gray_FFB74B
));
//设置文件颜色
// 去掉下划线
ds
.
setUnderlineText
(
false
);
}
},
end
,
end
+
6
,
0
);
tvAgreement
.
setMovementMethod
(
LinkMovementMethod
.
getInstance
());
tvAgreement
.
setText
(
ssb
,
TextView
.
BufferType
.
SPANNABLE
);
}
@Override
...
...
@@ -154,13 +213,15 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
confirmShow
=
!
confirmShow
;
ivClearAgainPwd
.
setSelected
(
confirmShow
);
etAgainPwd
.
setTransformationMethod
(
confirmShow
?
HideReturnsTransformationMethod
.
getInstance
()
:
PasswordTransformationMethod
.
getInstance
());
}
else
if
(
view
.
getId
()
==
R
.
id
.
tv_agreement
)
{
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_WEBVIEW
)
.
withString
(
"title"
,
"用户协议"
)
.
withString
(
"url"
,
ApiConfig
.
HTTP_URL_CAR_TYPE_NOTICE
)
.
withInt
(
"type"
,
15
)
.
navigation
();
}
else
if
(
view
.
getId
()
==
R
.
id
.
tv_registered
)
{
}
// else if (view.getId() == R.id.tv_agreement) {
// ARouter.getInstance().build(Constance.ACTIVITY_URL_WEBVIEW)
// .withString("title", "用户协议")
// .withString("url", ApiConfig.HTTP_URL_CAR_TYPE_NOTICE)
// .withInt("type", 15)
// .navigation();
// }
else
if
(
view
.
getId
()
==
R
.
id
.
tv_registered
)
{
if
(
getPwd
().
length
()
<
8
)
{
showToast
(
mActivity
.
getString
(
R
.
string
.
rv_pwd_length
));
return
;
...
...
@@ -376,4 +437,11 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
public
void
onComplete
(
SHARE_MEDIA
share_media
,
int
i
,
Map
<
String
,
String
>
map
)
{
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
// TODO: add setContentView(...) invocation
ButterKnife
.
bind
(
this
);
}
}
module_home/src/main/res/layout/rv_act_registered.xml
View file @
dc0ed428
...
...
@@ -5,12 +5,13 @@
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
".rv.module.ui.login.RegisteredActivity"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_30"
android:layout_marginRight=
"@dimen/size_30"
android:layout_marginTop=
"@dimen/size_50"
android:layout_marginRight=
"@dimen/size_30"
android:background=
"@drawable/shape_rv_input"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
...
...
@@ -20,8 +21,8 @@
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/size_15"
android:textColor=
"@color/text_Main"
android:text=
"@string/rv_phone_type"
android:textColor=
"@color/text_Main"
android:textSize=
"@dimen/text_16"
/>
<View
...
...
@@ -31,69 +32,72 @@
android:background=
"@color/colorMain"
/>
<EditText
android:id=
"@+id/et_phone"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@null"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_weight=
"1"
android:background=
"@null"
android:gravity=
"center_vertical"
android:hint=
"@string/rv_phone_hint"
android:inputType=
"number"
android:maxLength=
"11"
android:id=
"@+id/et_phone"
android:layout_weight=
"1"
android:maxLines=
"1"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:id=
"@+id/iv_clear_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:id=
"@+id/iv_clear_phone"
android:visibility=
"gone"
android:padding=
"@dimen/size_15"
android:src=
"@drawable/comment_publisher_clear"
/>
android:visibility=
"gone"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_30"
android:layout_marginRight=
"@dimen/size_30"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginRight=
"@dimen/size_30"
android:background=
"@drawable/shape_rv_input"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<EditText
android:id=
"@+id/et_phone_code"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@null"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_weight=
"1"
android:background=
"@null"
android:gravity=
"center_vertical"
android:hint=
"@string/rv_phone_code"
android:maxLength=
"6"
android:inputType=
"number"
android:id=
"@+id/et_phone_code"
android:layout_weight=
"1"
android:maxLength=
"6"
android:maxLines=
"1"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:id=
"@+id/iv_clear_code"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:id=
"@+id/iv_clear_code"
android:padding=
"@dimen/size_15"
android:visibility=
"gone"
android:src=
"@drawable/comment_publisher_clear"
/>
android:visibility=
"gone"
/>
<View
android:layout_width=
"@dimen/size_half"
android:layout_height=
"@dimen/size_30"
android:layout_marginRight=
"@dimen/size_8"
android:background=
"@color/colorMain"
/>
<TextView
android:id=
"@+id/tv_get_code"
android:layout_width=
"@dimen/size_100"
android:layout_height=
"match_parent"
android:id=
"@+id/tv_get_code"
android:layout_centerVertical=
"true"
android:gravity=
"center"
...
...
@@ -106,107 +110,129 @@
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_30"
android:layout_marginRight=
"@dimen/size_30"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginRight=
"@dimen/size_30"
android:background=
"@drawable/shape_rv_input"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<EditText
android:id=
"@+id/et_pwd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_weight=
"1"
android:background=
"@null"
android:gravity=
"center_vertical"
android:layout_marginLeft=
"@dimen/size_15"
android:hint=
"@string/rv_pwd_hint"
android:maxLength=
"16"
android:id=
"@+id/et_pwd"
android:inputType=
"textPassword"
android:
layout_weight=
"1
"
android:
maxLength=
"16
"
android:maxLines=
"1"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:id=
"@+id/iv_clear_pwd"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:id=
"@+id/iv_clear_pwd"
android:padding=
"@dimen/size_15"
android:src=
"@drawable/selector_rv_pwd"
/>
android:src=
"@drawable/selector_rv_pwd"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_30"
android:layout_marginRight=
"@dimen/size_30"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginRight=
"@dimen/size_30"
android:background=
"@drawable/shape_rv_input"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<EditText
android:id=
"@+id/et_again_pwd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_15"
android:layout_weight=
"1"
android:background=
"@null"
android:gravity=
"center_vertical"
android:layout_marginLeft=
"@dimen/size_15"
android:hint=
"@string/rv_pwd_again_hint"
android:maxLength=
"16"
android:inputType=
"textPassword"
android:id=
"@+id/et_again_pwd"
android:layout_weight=
"1"
android:maxLength=
"16"
android:maxLines=
"1"
android:textColorHint=
"@color/colorGray"
android:textSize=
"@dimen/text_16"
/>
<ImageView
android:id=
"@+id/iv_clear_again_pwd"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:id=
"@+id/iv_clear_again_pwd"
android:padding=
"@dimen/size_15"
android:src=
"@drawable/selector_rv_pwd"
/>
android:src=
"@drawable/selector_rv_pwd"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:layout_marginLeft=
"@dimen/size_30"
android:layout_marginRight=
"@dimen/size_30"
android:layout_marginTop=
"@dimen/size_15"
android:
orientation=
"horizontal
"
android:
layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:
layout_marginRight=
"@dimen/size_30
"
android:
orientation=
"horizontal"
>
<CheckBox
android:id=
"@+id/cb_annotations"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/text_14"
android:id=
"@+id/cb_annotations"
android:textColor=
"@color/textGray"
android:text
=
"@string/rv_registered_annotations"
/>
android:text
Size=
"@dimen/text_14"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:textColor=
"@color/gray_FFB74B"
android:id=
"@+id/tv_agreement"
android:textSize=
"@dimen/text_16"
android:text=
"@string/rv_registered_agreement"
/>
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_14"
/>
</LinearLayout>
<!--
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/rv_registered_agreement"
android:textColor="@color/gray_FFB74B"
android:textSize="@dimen/text_16" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="和"
android:textColor="@color/textGray"
android:textSize="@dimen/text_16" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="《隐私政策》"
android:textColor="@color/gray_FFB74B"
android:textSize="@dimen/text_16" />-->
</LinearLayout>
<TextView
android:id=
"@+id/tv_registered"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:layout_marginLeft=
"@dimen/size_30"
android:layout_marginTop=
"@dimen/size_40"
android:layout_marginRight=
"@dimen/size_30"
android:layout_height=
"@dimen/size_50"
android:textColor=
"@color/colorWrite"
android:text=
"@string/rv_registered"
android:textSize=
"@dimen/size_16"
android:id=
"@+id/tv_registered"
android:gravity=
"center"
android:enabled=
"false"
android:background=
"@drawable/selector_rv_button"
android:layout_marginTop=
"@dimen/size_40"
/>
android:enabled=
"false"
android:gravity=
"center"
android:text=
"@string/rv_registered"
android:textColor=
"@color/colorWrite"
android:textSize=
"@dimen/size_16"
/>
</LinearLayout>
module_home/src/main/res/values/strings.xml
View file @
dc0ed428
...
...
@@ -20,7 +20,7 @@
<string
name=
"rv_pwd_hint"
>
请输入密码
</string>
<string
name=
"rv_pwd_again_hint"
>
请再次输入密码
</string>
<string
name=
"rv_registered"
>
注册
</string>
<string
name=
"rv_registered_annotations"
>
注册即表示同意
欣新
房车
</string>
<string
name=
"rv_registered_annotations"
>
注册即表示同意
滴
房车
</string>
<string
name=
"rv_registered_agreement"
>
《用户协议》
</string>
<string
name=
"rv_phone_registered"
>
手机注册
</string>
<string
name=
"rv_phone_bind"
>
绑定手机
</string>
...
...
module_tourism/src/main/res/layout/activity_travel_details.xml
View file @
dc0ed428
...
...
@@ -73,53 +73,50 @@
<include
layout=
"@layout/common_line"
/>
<FrameLayout
<WebView
android:id=
"@+id/webView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"0dp"
android:layout_weight=
"1"
/>
<WebView
android:id=
"@+id/webView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<LinearLayout
android:id=
"@+id/ll_item_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:orientation=
"vertical"
>
<include
layout=
"@layout/common_line"
/>
<LinearLayout
android:id=
"@+id/ll_item_bottom"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:orientation=
"vertical"
>
<include
layout=
"@layout/common_line"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
android:orientation=
"horizontal"
>
<TextView
android:background=
"@color/white"
android:id=
"@+id/tv_customer_service"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"联系客服"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_14"
/>
<TextView
android:id=
"@+id/tv_appointment"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@color/gray_FFB74B"
android:gravity=
"center"
android:text=
"立即预订"
android:textColor=
"@color/colorWrite"
android:textSize=
"@dimen/text_14"
/>
</LinearLayout>
android:layout_height=
"@dimen/size_50"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_customer_service"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@color/white"
android:gravity=
"center"
android:text=
"联系客服"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_14"
/>
<TextView
android:id=
"@+id/tv_appointment"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@color/gray_FFB74B"
android:gravity=
"center"
android:text=
"立即预订"
android:textColor=
"@color/colorWrite"
android:textSize=
"@dimen/text_14"
/>
</LinearLayout>
</
Frame
Layout>
</
Linear
Layout>
</LinearLayout>
plugin_poster/src/main/java/com/rv/poster/plugin/CarPosterActivity.java
View file @
dc0ed428
...
...
@@ -14,11 +14,11 @@ import android.support.v7.widget.CardView;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.ScrollView
;
import
android.widget.TextView
;
import
com.alibaba.android.arouter.facade.annotation.Autowired
;
import
com.alibaba.android.arouter.facade.annotation.Route
;
import
com.base.utils.ui.datetime.selector.util.TextUtil
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.load.resource.bitmap.RoundedCorners
;
import
com.bumptech.glide.request.RequestOptions
;
...
...
@@ -79,6 +79,8 @@ public class CarPosterActivity extends BaseStatusActivity<CommonPresenter> {
@Autowired
()
String
imageUrl
;
@BindView
(
R2
.
id
.
scrollView
)
ScrollView
scrollView
;
private
ShareManager
shareManager
;
...
...
@@ -141,17 +143,17 @@ public class CarPosterActivity extends BaseStatusActivity<CommonPresenter> {
private
void
preShare
(
int
type
,
int
requestCode
)
{
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
M
)
{
if
(
type
==
0
)
{
saveBill
(
llBillContent
);
saveBill
(
scrollView
);
}
else
{
share
(
llBillContent
);
share
(
scrollView
);
}
}
else
{
if
(
ContextCompat
.
checkSelfPermission
(
this
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
==
PackageManager
.
PERMISSION_GRANTED
)
{
if
(
type
==
0
)
{
saveBill
(
llBillContent
);
saveBill
(
scrollView
);
}
else
{
share
(
llBillContent
);
share
(
scrollView
);
}
}
else
{
//申请权限
ActivityCompat
.
requestPermissions
(
this
,
...
...
@@ -167,14 +169,14 @@ public class CarPosterActivity extends BaseStatusActivity<CommonPresenter> {
switch
(
requestCode
)
{
case
1001
:
if
(
grantResults
[
0
]
==
PackageManager
.
PERMISSION_GRANTED
)
{
saveBill
(
llBillContent
);
saveBill
(
scrollView
);
}
else
{
showToast
(
"授权失败,无法分享海报"
);
}
break
;
case
1002
:
if
(
grantResults
[
0
]
==
PackageManager
.
PERMISSION_GRANTED
)
{
share
(
llBillContent
);
share
(
scrollView
);
}
else
{
showToast
(
"授权失败,无法分享海报"
);
}
...
...
@@ -268,9 +270,9 @@ public class CarPosterActivity extends BaseStatusActivity<CommonPresenter> {
* 保存海报
* @param view
*/
public
void
saveBill
(
View
view
)
{
public
void
saveBill
(
Scroll
View
view
)
{
if
(
view
!=
null
)
{
Bitmap
bitmap
=
ShareUtils
.
viewConversionBitmap
(
view
);
Bitmap
bitmap
=
ShareUtils
.
getBitmapByView
(
view
);
File
file
=
null
;
if
(
bitmap
!=
null
)
{
file
=
ShareUtils
.
saveBitmapFile
(
mActivity
,
bitmap
);
...
...
plugin_poster/src/main/java/com/rv/poster/plugin/PosterActivity.java
View file @
dc0ed428
...
...
@@ -5,7 +5,6 @@ import android.content.Intent;
import
android.content.pm.PackageManager
;
import
android.content.res.Configuration
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
...
...
@@ -15,6 +14,7 @@ import android.support.v7.widget.CardView;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.ScrollView
;
import
android.widget.TextView
;
import
com.alibaba.android.arouter.facade.annotation.Autowired
;
...
...
@@ -26,7 +26,6 @@ import com.frame.base.url.Constance;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseStatusActivity
;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.ruiwenliu.wrapper.bean.BeanUserInfo
;
import
com.ruiwenliu.wrapper.bean.UserInfoBean
;
import
com.ruiwenliu.wrapper.util.TransformationUtil
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
...
...
@@ -48,6 +47,7 @@ import com.umeng.socialize.utils.ShareBoardlistener;
import
java.io.File
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
/**
...
...
@@ -73,6 +73,8 @@ public class PosterActivity extends BaseStatusActivity<CommonPresenter> {
@Autowired
()
String
imageUrl
;
@BindView
(
R2
.
id
.
scrollView
)
ScrollView
scrollView
;
private
ShareManager
shareManager
;
...
...
@@ -148,17 +150,17 @@ public class PosterActivity extends BaseStatusActivity<CommonPresenter> {
private
void
preShare
(
int
type
,
int
requestCode
)
{
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
M
)
{
if
(
type
==
0
)
{
saveBill
(
llBillContent
);
saveBill
(
scrollView
);
}
else
{
share
(
llBillContent
);
share
(
scrollView
);
}
}
else
{
if
(
ContextCompat
.
checkSelfPermission
(
this
,
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
==
PackageManager
.
PERMISSION_GRANTED
)
{
if
(
type
==
0
)
{
saveBill
(
llBillContent
);
saveBill
(
scrollView
);
}
else
{
share
(
llBillContent
);
share
(
scrollView
);
}
}
else
{
//申请权限
ActivityCompat
.
requestPermissions
(
this
,
...
...
@@ -174,14 +176,14 @@ public class PosterActivity extends BaseStatusActivity<CommonPresenter> {
switch
(
requestCode
)
{
case
1001
:
if
(
grantResults
[
0
]
==
PackageManager
.
PERMISSION_GRANTED
)
{
saveBill
(
llBillContent
);
saveBill
(
scrollView
);
}
else
{
showToast
(
"授权失败,无法分享海报"
);
}
break
;
case
1002
:
if
(
grantResults
[
0
]
==
PackageManager
.
PERMISSION_GRANTED
)
{
share
(
llBillContent
);
share
(
scrollView
);
}
else
{
showToast
(
"授权失败,无法分享海报"
);
}
...
...
@@ -276,9 +278,9 @@ public class PosterActivity extends BaseStatusActivity<CommonPresenter> {
* 保存海报
* @param view
*/
public
void
saveBill
(
View
view
)
{
public
void
saveBill
(
Scroll
View
view
)
{
if
(
view
!=
null
)
{
Bitmap
bitmap
=
ShareUtils
.
viewConversionBitmap
(
view
);
Bitmap
bitmap
=
ShareUtils
.
getBitmapByView
(
view
);
File
file
=
null
;
if
(
bitmap
!=
null
)
{
file
=
ShareUtils
.
saveBitmapFile
(
mActivity
,
bitmap
);
...
...
@@ -288,4 +290,11 @@ public class PosterActivity extends BaseStatusActivity<CommonPresenter> {
}
}
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
// TODO: add setContentView(...) invocation
ButterKnife
.
bind
(
this
);
}
}
plugin_poster/src/main/res/layout/activity_carposter.xml
View file @
dc0ed428
...
...
@@ -24,6 +24,7 @@
app:cardCornerRadius=
"5dp"
>
<ScrollView
android:id=
"@+id/scrollView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_5"
...
...
plugin_poster/src/main/res/layout/activity_poster.xml
View file @
dc0ed428
...
...
@@ -24,6 +24,7 @@
app:cardCornerRadius=
"5dp"
>
<ScrollView
android:id=
"@+id/scrollView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_5"
...
...
@@ -68,9 +69,9 @@
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:singleLine=
"false"
android:maxLines=
"2"
android:ellipsize=
"end"
android:maxLines=
"2"
android:singleLine=
"false"
android:text=
""
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_15"
/>
...
...
plugin_share/src/main/res/layout/activity_reative_bill.xml
View file @
dc0ed428
...
...
@@ -83,9 +83,11 @@
android:id=
"@+id/tv_phone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"2"
android:singleLine=
"false"
android:textColor=
"@color/
colorMain
"
android:textSize=
"@dimen/text_1
8
"
/>
android:textColor=
"@color/
textGray
"
android:textSize=
"@dimen/text_1
5
"
/>
<TextView
android:layout_width=
"wrap_content"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment