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
02a17a88
Commit
02a17a88
authored
Sep 26, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
5ec63cb4
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
126 additions
and
61 deletions
+126
-61
dimens.xml
RvWrapper/src/main/res/values/dimens.xml
+1
-0
MyTextWatcher.java
...s/src/main/java/com/rv/component/utils/MyTextWatcher.java
+52
-0
PostPatActivity.java
...c/main/java/com/xxfc/discovery/other/PostPatActivity.java
+36
-35
HotCarTypeAdapter.java
...ome/rv/module/ui/main/home/adapter/HotCarTypeAdapter.java
+9
-3
fragment_home.xml
module_home/src/main/res/layout/fragment_home.xml
+2
-2
PersonalInformationActivity.java
...a/com/rv/rvmine/traveler/PersonalInformationActivity.java
+6
-7
activity_personal_information.xml
...ine/src/main/res/layout/activity_personal_information.xml
+0
-1
TravelDetailsActivity.java
...main/java/com/rv/tourism/other/TravelDetailsActivity.java
+12
-9
PosterActivity.java
...er/src/main/java/com/rv/poster/plugin/PosterActivity.java
+2
-1
activity_poster.xml
plugin_poster/src/main/res/layout/activity_poster.xml
+6
-3
No files found.
RvWrapper/src/main/res/values/dimens.xml
View file @
02a17a88
...
...
@@ -52,6 +52,7 @@
<dimen
name=
"size_240"
>
240dp
</dimen>
<dimen
name=
"size_245"
>
245dp
</dimen>
<dimen
name=
"size_250"
>
250dp
</dimen>
<dimen
name=
"size_410"
>
410dp
</dimen>
<dimen
name=
"size_420"
>
420dp
</dimen>
<dimen
name=
"size_440"
>
440dp
</dimen>
<dimen
name=
"size_500"
>
500dp
</dimen>
...
...
component_utils/src/main/java/com/rv/component/utils/MyTextWatcher.java
0 → 100644
View file @
02a17a88
package
com
.
rv
.
component
.
utils
;
import
android.content.Context
;
import
android.text.Editable
;
import
android.text.Selection
;
import
android.text.TextWatcher
;
import
android.util.Log
;
import
android.widget.EditText
;
import
android.widget.Toast
;
public
class
MyTextWatcher
implements
TextWatcher
{
private
Context
context
;
private
EditText
editText
;
private
int
len
;
//允许输入的字节长度(一个中文占3个字节)
public
MyTextWatcher
(
Context
context
,
EditText
editText
,
int
len
)
{
this
.
context
=
context
;
this
.
editText
=
editText
;
this
.
len
=
len
;
}
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{
}
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{
}
@Override
public
void
afterTextChanged
(
Editable
editable
)
{
String
inputStr
=
editable
.
toString
().
trim
();
byte
[]
bytes
=
inputStr
.
getBytes
();
if
(
bytes
.
length
>
len
)
{
Toast
.
makeText
(
context
,
"超过规定字符数"
,
Toast
.
LENGTH_SHORT
).
show
();
Log
.
i
(
"str"
,
inputStr
);
//取前15个字节
byte
[]
newBytes
=
new
byte
[
len
];
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
newBytes
[
i
]
=
bytes
[
i
];
}
String
newStr
=
new
String
(
newBytes
);
editText
.
setText
(
newStr
);
//将光标定位到最后
Selection
.
setSelection
(
editText
.
getEditableText
(),
newStr
.
length
());
}
}
}
module_discovery/src/main/java/com/xxfc/discovery/other/PostPatActivity.java
View file @
02a17a88
...
...
@@ -368,43 +368,43 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
// 多张图片压缩 相册
private
void
album
(
ArrayList
<
String
>
stringArrayListExtra
,
boolean
isOriginal
)
{
if
(
isOriginal
)
{
// 原图发送,不压缩
Log
.
e
(
"zq"
,
"原图上传,不压缩,选择原文件路径"
);
for
(
int
i
=
0
;
i
<
stringArrayListExtra
.
size
();
i
++)
{
mPhotoList
.
add
(
stringArrayListExtra
.
get
(
i
));
mAdapter
.
notifyDataSetInvalidated
();
}
return
;
}
List
<
File
>
fileList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
stringArrayListExtra
.
size
();
i
++)
{
// Luban只处理特定后缀的图片,不满足的不处理也不走回调,
// 只能挑出来不压缩,
List
<
String
>
lubanSupportFormatList
=
Arrays
.
asList
(
"jpg"
,
"jpeg"
,
"png"
,
"webp"
,
"gif"
);
boolean
support
=
false
;
for
(
int
j
=
0
;
j
<
lubanSupportFormatList
.
size
();
j
++)
{
if
(
stringArrayListExtra
.
get
(
i
).
endsWith
(
lubanSupportFormatList
.
get
(
j
)))
{
support
=
true
;
break
;
}
}
if
(!
support
)
{
fileList
.
add
(
new
File
(
stringArrayListExtra
.
get
(
i
)));
stringArrayListExtra
.
remove
(
i
);
}
}
if
(
fileList
.
size
()
>
0
)
{
for
(
File
file
:
fileList
)
{
// 不压缩的部分,直接发送
mPhotoList
.
add
(
file
.
getPath
());
mAdapter
.
notifyDataSetInvalidated
();
}
}
//
if (isOriginal) {// 原图发送,不压缩
//
Log.e("zq", "原图上传,不压缩,选择原文件路径");
//
for (int i = 0; i < stringArrayListExtra.size(); i++) {
//
mPhotoList.add(stringArrayListExtra.get(i));
//
mAdapter.notifyDataSetInvalidated();
//
}
//
return;
//
}
//
List<File> fileList = new ArrayList<>();
//
for (int i = 0; i < stringArrayListExtra.size(); i++) {
//
// Luban只处理特定后缀的图片,不满足的不处理也不走回调,
//
// 只能挑出来不压缩,
//
List<String> lubanSupportFormatList = Arrays.asList("jpg", "jpeg", "png", "webp", "gif");
//
boolean support = false;
//
for (int j = 0; j < lubanSupportFormatList.size(); j++) {
//
if (stringArrayListExtra.get(i).endsWith(lubanSupportFormatList.get(j))) {
//
support = true;
//
break;
//
}
//
}
//
if (!support) {
//
fileList.add(new File(stringArrayListExtra.get(i)));
//
stringArrayListExtra.remove(i);
//
}
//
}
//
//
if (fileList.size() > 0) {
//
for (File file : fileList) {// 不压缩的部分,直接发送
//
mPhotoList.add(file.getPath());
//
mAdapter.notifyDataSetInvalidated();
//
}
//
}
Luban
.
with
(
this
)
.
load
(
stringArrayListExtra
)
.
ignoreBy
(
100
)
// 原图小于10
0kb 不压缩
.
ignoreBy
(
70
)
// 原图小于7
0kb 不压缩
.
setCompressListener
(
new
OnCompressListener
()
{
@Override
public
void
onStart
()
{
...
...
@@ -413,6 +413,7 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
@Override
public
void
onSuccess
(
File
file
)
{
Log
.
e
(
"zq"
,
"压缩成功,压缩后图片位置:"
+
file
.
getPath
()
+
"压缩后图片大小:"
+
file
.
length
()
/
1024
+
"KB"
);
mPhotoList
.
add
(
file
.
getPath
());
mAdapter
.
notifyDataSetInvalidated
();
}
...
...
@@ -431,7 +432,7 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
// 拍照出来的图片Luban一定支持,
Luban
.
with
(
this
)
.
load
(
file
)
.
ignoreBy
(
100
)
// 原图小于10
0kb 不压缩
.
ignoreBy
(
70
)
// 原图小于7
0kb 不压缩
// .putGear(2) // 设定压缩档次,默认三挡
// .setTargetDir() // 指定压缩后的图片路径
.
setCompressListener
(
new
OnCompressListener
()
{
//设置回调
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/adapter/HotCarTypeAdapter.java
View file @
02a17a88
...
...
@@ -45,13 +45,19 @@ public class HotCarTypeAdapter extends BaseQuickAdapter<HomeHotGoodListBean.Data
.
apply
(
RequestOptions
.
bitmapTransform
(
new
RoundedCorners
(
12
)).
override
(
image
.
getWidth
(),
image
.
getHeight
()))
.
into
(
utils
);
helper
.
setText
(
R
.
id
.
tv_name
,
bean
.
getName
());
helper
.
setText
(
R
.
id
.
tv_content
,
bean
.
getName1
());
helper
.
setText
(
R
.
id
.
tv_name
,
bean
.
getName
());
helper
.
setText
(
R
.
id
.
tv_content
,
bean
.
getName1
());
if
(!
TextUtil
.
isEmpty
(
bean
.
getPrice
()))
{
helper
.
setText
(
R
.
id
.
tv_price
,
String
.
format
(
"¥%1$s%2$s"
,
bean
.
getPrice
(),
getUnit
()));
}
else
{
helper
.
setText
(
R
.
id
.
tv_price
,
""
);
}
if
(
"2"
.
equals
(
hotType
)
||
"4"
.
equals
(
hotType
))
{
helper
.
setGone
(
R
.
id
.
tv_content
,
false
);
}
else
{
helper
.
setGone
(
R
.
id
.
tv_content
,
true
);
}
}
public
void
setType
(
String
hotType
)
{
...
...
@@ -75,7 +81,7 @@ public class HotCarTypeAdapter extends BaseQuickAdapter<HomeHotGoodListBean.Data
}
// @Override
// @Override
// public int getItemCount() {
// return 4;
// }
...
...
module_home/src/main/res/layout/fragment_home.xml
View file @
02a17a88
...
...
@@ -556,11 +556,11 @@
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
<!---->
<android.support.v7.widget.RecyclerView
android:id=
"@+id/recyclerView_home_content"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_4
4
0"
android:layout_height=
"@dimen/size_4
1
0"
android:layout_marginTop=
"@dimen/size_10"
android:paddingLeft=
"@dimen/size_10"
android:paddingRight=
"@dimen/size_10"
/>
...
...
module_mine/src/main/java/com/rv/rvmine/traveler/PersonalInformationActivity.java
View file @
02a17a88
...
...
@@ -29,6 +29,7 @@ import com.ruiwenliu.wrapper.util.permission.RxPermission;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.component.dialog.PickerDialog
;
import
com.rv.component.utils.IsAppInstall
;
import
com.rv.component.utils.MyTextWatcher
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.ui.main.home.bean.ImageUploadBean
;
import
com.rv.rvmine.R
;
...
...
@@ -96,7 +97,7 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
private
String
mUnionid
;
private
String
mHeadImg
;
private
String
birthday
;
private
String
birthday
=
""
;
public
static
Intent
getIntent
(
Context
context
,
UserInfoBean
.
UserInfo
info
)
{
return
new
Intent
(
context
,
PersonalInformationActivity
.
class
)
...
...
@@ -112,6 +113,8 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
titleView
.
setTitle
(
"个人资料"
);
titleView
.
setText
(
R
.
id
.
tv_title_right
,
"保存"
);
etNickname
.
addTextChangedListener
(
new
MyTextWatcher
(
this
,
etNickname
,
32
));
titleView
.
setChildClickListener
(
R
.
id
.
tv_title_right
,
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
...
...
@@ -130,11 +133,7 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
if
(
info
.
getNickname
()
!=
null
)
{
etNickname
.
setText
(
info
.
getNickname
());
if
(!
TextUtils
.
isEmpty
(
info
.
getNickname
()))
{
if
(
info
.
getNickname
().
length
()
<=
10
)
{
etNickname
.
setSelection
(
info
.
getNickname
().
length
());
}
else
{
etNickname
.
setSelection
(
10
);
}
}
}
if
(
info
.
getRealname
()
!=
null
)
{
...
...
@@ -387,7 +386,7 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
return
;
}
if
(
TextUtil
.
isEmpty
(
birthday
))
{
if
(
birthday
!=
null
&&
TextUtil
.
isEmpty
(
birthday
))
{
showToast
(
"生日不为空!"
);
return
;
}
...
...
module_mine/src/main/res/layout/activity_personal_information.xml
View file @
02a17a88
...
...
@@ -59,7 +59,6 @@
android:background=
"@null"
android:gravity=
"right|center_vertical"
android:hint=
"请输入昵称"
android:maxLength=
"10"
android:maxLines=
"1"
android:textColor=
"@color/colorMain"
android:textColorHint=
"@color/colorGray"
...
...
module_tourism/src/main/java/com/rv/tourism/other/TravelDetailsActivity.java
View file @
02a17a88
...
...
@@ -236,10 +236,12 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
if
(
travelBookingDialog
==
null
)
{
travelBookingDialog
=
new
TravelBookingDialog
(
mActivity
);
}
if
(
travelBookingDialog
!=
null
)
{
travelBookingDialog
.
setNewData
(
DetailsData
);
travelBookingDialog
.
show
();
}
}
if
(
travelBookingDialog
!=
null
)
{
travelBookingDialog
.
setOnDayClickListener
(
new
TravelBookingDialog
.
OnOKClickListener
()
{
@Override
public
void
onClickData
(
BeanOrderParam
data
)
{
...
...
@@ -247,6 +249,7 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
}
});
}
}
private
void
cancelCollect
()
{
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
...
...
plugin_poster/src/main/java/com/rv/poster/plugin/PosterActivity.java
View file @
02a17a88
...
...
@@ -120,7 +120,8 @@ public class PosterActivity extends BaseStatusActivity<CommonPresenter> {
}
}
else
{
GlideManager
.
getInstance
(
mActivity
).
loadCircleImage
(
"https://mgmt.dfangche.com/image/app/default_avatar.png"
,
ringHeader
);
tvName
.
setText
(
"滴房车"
);
// tvName.setText("滴房车");
tvName
.
setText
(
"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈"
);
}
}
...
...
plugin_poster/src/main/res/layout/activity_poster.xml
View file @
02a17a88
...
...
@@ -60,7 +60,7 @@
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/size_
5
"
android:layout_marginLeft=
"@dimen/size_
10
"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
...
...
@@ -69,8 +69,11 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:singleLine=
"false"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/text_18"
/>
android:maxLines=
"2"
android:ellipsize=
"end"
android:text=
""
android:textColor=
"@color/textGray"
android:textSize=
"@dimen/text_15"
/>
</LinearLayout>
...
...
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