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
ca1b3dd4
Commit
ca1b3dd4
authored
Aug 22, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
e146e3ca
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
28 deletions
+67
-28
GlideManager.java
...n/java/com/ruiwenliu/wrapper/util/glide/GlideManager.java
+10
-1
CampDetailActivity.java
...mp/src/main/java/com/rv/camp/camp/CampDetailActivity.java
+13
-4
CarRentalListActivity.java
...rv/home/rv/module/ui/main/home/CarRentalListActivity.java
+2
-2
HomeFragment.java
...java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
+5
-3
DepositefundProgressDetailsActivity.java
.../main/home/order/DepositefundProgressDetailsActivity.java
+11
-2
PhotoPagerAdapter.java
...java/com/xxfc/imcamera/photopicker/PhotoPagerAdapter.java
+8
-5
ZoomImageView.java
...a/src/main/java/com/xxfc/imcamera/view/ZoomImageView.java
+5
-5
item_preview.xml
plugin_imcamera/src/main/res/layout/item_preview.xml
+13
-6
No files found.
RvWrapper/src/main/java/com/ruiwenliu/wrapper/util/glide/GlideManager.java
View file @
ca1b3dd4
...
...
@@ -66,6 +66,7 @@ public class GlideManager {
.
apply
(
new
RequestOptions
()
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
))
.
dontAnimate
()
.
into
(
image
);
}
...
...
@@ -75,7 +76,7 @@ public class GlideManager {
* @param url
* @param image
*/
public
void
loadImage
(
String
url
,
ImageView
image
,
int
defaultImg
)
{
public
void
loadImage
(
String
url
,
ImageView
image
,
int
defaultImg
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
placeholder
(
defaultImg
)
...
...
@@ -84,6 +85,7 @@ public class GlideManager {
.
skipMemoryCache
(
false
)
.
disallowHardwareConfig
()
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
))
.
dontAnimate
()
.
into
(
image
);
}
...
...
@@ -103,6 +105,7 @@ public class GlideManager {
.
skipMemoryCache
(
true
)
.
disallowHardwareConfig
()
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
))
.
dontAnimate
()
.
into
(
image
);
}
...
...
@@ -120,6 +123,7 @@ public class GlideManager {
.
error
(
R
.
drawable
.
glide_icon_error
)
.
skipMemoryCache
(
false
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
)
.
dontAnimate
()
.
into
(
image
);
}
...
...
@@ -137,6 +141,7 @@ public class GlideManager {
.
apply
(
new
RequestOptions
()
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
).
override
(
x
,
y
))
.
dontAnimate
()
.
into
(
image
);
}
...
...
@@ -154,6 +159,7 @@ public class GlideManager {
.
error
(
R
.
drawable
.
glide_icon_error
)
// .apply(RequestOptions.bitmapTransform(new CenterCrop(),new RoundedCorners(round)))
.
apply
(
RequestOptions
.
bitmapTransform
(
new
GlideRoundTransform
(
mContext
,
round
)))
.
dontAnimate
()
.
into
(
image
);
}
...
...
@@ -172,6 +178,7 @@ public class GlideManager {
.
error
(
R
.
drawable
.
glide_icon_error
)
// .apply(RequestOptions.bitmapTransform(new CenterCrop(),new RoundedCorners(round)))
.
apply
(
RequestOptions
.
bitmapTransform
(
new
GlideRoundTransform
(
mContext
,
round
)))
.
dontAnimate
()
.
into
(
image
);
}
...
...
@@ -193,6 +200,7 @@ public class GlideManager {
.
placeholder
(
R
.
drawable
.
glide_icon_placeholder
)
.
error
(
R
.
drawable
.
glide_icon_error
)
.
apply
(
RequestOptions
.
bitmapTransform
(
new
RoundedCorners
(
round
)).
override
(
50
,
50
))
.
dontAnimate
()
.
into
(
image
);
}
...
...
@@ -211,6 +219,7 @@ public class GlideManager {
.
diskCacheStrategy
(
DiskCacheStrategy
.
NONE
)
//不做磁盘缓存
.
skipMemoryCache
(
true
)
//不做内存缓存
)
.
dontAnimate
()
.
into
(
image
);
}
...
...
module_camp/src/main/java/com/rv/camp/camp/CampDetailActivity.java
View file @
ca1b3dd4
...
...
@@ -4,13 +4,16 @@ import android.annotation.TargetApi;
import
android.content.ClipData
;
import
android.content.ClipboardManager
;
import
android.content.Intent
;
import
android.graphics.Bitmap
;
import
android.net.Uri
;
import
android.net.http.SslError
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.View
;
import
android.webkit.JavascriptInterface
;
import
android.webkit.SslErrorHandler
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebResourceRequest
;
import
android.webkit.WebSettings
;
...
...
@@ -101,8 +104,6 @@ public class CampDetailActivity extends BaseStatusActivity<CampPresenter> {
}
}
});
}
...
...
@@ -177,6 +178,12 @@ public class CampDetailActivity extends BaseStatusActivity<CampPresenter> {
return
super
.
shouldOverrideUrlLoading
(
view
,
request
);
}
});
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
mWebView
.
getSettings
().
setMixedContentMode
(
WebSettings
.
MIXED_CONTENT_COMPATIBILITY_MODE
);
}
mWebView
.
loadUrl
(
webUrl
);
mWebView
.
setWebChromeClient
(
new
WebChromeClient
()
{
@Override
...
...
@@ -242,7 +249,9 @@ public class CampDetailActivity extends BaseStatusActivity<CampPresenter> {
@Override
protected
void
onPause
()
{
super
.
onPause
();
mWebView
.
loadUrl
(
"about:blank"
);
mWebView
.
onPause
();
//生命周期onPause
}
@Override
...
...
@@ -291,12 +300,12 @@ public class CampDetailActivity extends BaseStatusActivity<CampPresenter> {
}
else
if
(
snsPlatform
.
mShowWord
.
equals
(
"复制链接"
))
{
copyText
();
}
else
if
(
snsPlatform
.
mShowWord
.
contains
(
"微信"
))
{
}
else
if
(
snsPlatform
.
mShowWord
.
contains
(
"微信"
))
{
if
(!
IsAppInstall
.
isWeixinAvilible
(
mActivity
))
{
showToast
(
"亲,您微信还没有安装呢"
);
return
;
}
}
else
if
(
snsPlatform
.
mShowWord
.
contains
(
"QQ"
))
{
}
else
if
(
snsPlatform
.
mShowWord
.
contains
(
"QQ"
))
{
if
(!
IsAppInstall
.
isQQClientAvailable
(
mActivity
))
{
showToast
(
"亲,您QQ还没有安装呢"
);
return
;
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/CarRentalListActivity.java
View file @
ca1b3dd4
...
...
@@ -273,8 +273,8 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
map
.
put
(
"lat"
,
mLat
);
map
.
put
(
"lon"
,
mLon
);
map
.
put
(
"parkBranchCompanyId"
,
dataBean
.
getStartCompanyId
());
//
map.put("startCompanyId",dataBean.getStartCompanyId());
//
map.put("endCompanyId",dataBean.getEndCompanyId());
map
.
put
(
"startCompanyId"
,
dataBean
.
getStartCompanyId
());
map
.
put
(
"endCompanyId"
,
dataBean
.
getEndCompanyId
());
try
{
map
.
put
(
"startDateTamp"
,
TimeManager
.
dateToStamp
(
begDate
));
map
.
put
(
"endDateTamp"
,
TimeManager
.
dateToStamp
(
endDate
));
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/HomeFragment.java
View file @
ca1b3dd4
...
...
@@ -263,7 +263,7 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
begDate
=
MyUtils
.
getFetureDate
(
1
)
+
" 09:00"
;
tvGetTime
.
setText
(
DateUtils
.
formatDate66
(
begDate
));
tvGetWeek
.
setText
(
"周"
+
MyUtils
.
getWeek
(
DateUtils
.
getCurDate
()));
endDate
=
MyUtils
.
getFetureDate
(
2
)+
" 18:00"
;
endDate
=
MyUtils
.
getFetureDate
(
2
)
+
" 18:00"
;
tvOutTime
.
setText
(
DateUtils
.
formatDate66
(
endDate
));
tvOutWeek
.
setText
(
"周"
+
MyUtils
.
getWeek
(
MyUtils
.
getFetureDate
(
2
)));
...
...
@@ -1135,8 +1135,10 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
CityPickerBean
bean
=
new
Gson
().
fromJson
(
json
,
CityPickerBean
.
class
);
for
(
CityPickerBean
.
CityBean
cityBean
:
bean
.
getCity
())
{
for
(
ListsBean
lsBean
:
cityBean
.
getLists
())
{
if
(
nowCity
.
equals
(
lsBean
.
getName
()))
{
addrCity
=
lsBean
.
getId
();
if
(!
TextUtils
.
isEmpty
(
nowCity
))
{
if
(
nowCity
.
equals
(
lsBean
.
getName
()))
{
addrCity
=
lsBean
.
getId
();
}
}
}
}
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/DepositefundProgressDetailsActivity.java
View file @
ca1b3dd4
...
...
@@ -2,6 +2,7 @@ package com.rv.home.rv.module.ui.main.home.order;
import
android.content.Context
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.view.View
;
...
...
@@ -133,18 +134,26 @@ public class DepositefundProgressDetailsActivity extends BaseStatusActivity<Pick
}
@JavascriptInterface
public
void
showImage
(
int
selectPosition
,
String
imageJson
)
{
public
void
showImage
(
int
selectPosition
,
String
imageJson
)
{
if
(!
TextUtil
.
isEmpty
(
imageJson
))
{
List
<
String
>
imagesList
=
new
Gson
().
fromJson
(
imageJson
,
new
TypeToken
<
List
<
String
>>()
{
}.
getType
());
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
ActivityImageBrowseUrl
.
KEY_BACKGROUND
,
R
.
color
.
colorPrimary
);
bundle
.
putInt
(
ActivityImageBrowseUrl
.
KEY_SELECTPOSITION
,
selectPosition
);
bundle
.
putInt
(
ActivityImageBrowseUrl
.
KEY_SELECTPOSITION
,
selectPosition
);
bundle
.
putStringArrayList
(
ActivityImageBrowseUrl
.
KEY_IMAGE
,
(
ArrayList
<
String
>)
imagesList
);
IntentUtil
.
startActivity
(
mActivity
,
ActivityImageBrowseUrl
.
class
,
bundle
);
}
}
@JavascriptInterface
public
void
call
(
String
phone
)
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_DIAL
);
Uri
uri
=
Uri
.
parse
(
"tel:"
+
phone
);
intent
.
setData
(
uri
);
startActivity
(
intent
);
}
}
...
...
plugin_imcamera/src/main/java/com/xxfc/imcamera/photopicker/PhotoPagerAdapter.java
View file @
ca1b3dd4
...
...
@@ -9,6 +9,7 @@ import android.view.ViewGroup;
import
android.widget.ImageView
;
import
com.ruiwenliu.wrapper.util.glide.GlideApp
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.xxfc.imcamera.R
;
import
java.io.File
;
...
...
@@ -53,11 +54,13 @@ public class PhotoPagerAdapter extends PagerAdapter {
}
else
{
uri
=
Uri
.
fromFile
(
new
File
(
path
));
}
GlideApp
.
with
(
mContext
)
.
load
(
uri
)
.
placeholder
(
R
.
drawable
.
default_error
)
.
error
(
R
.
drawable
.
default_error
)
.
into
(
imageView
);
GlideManager
.
getInstance
(
mContext
).
loadImage
(
String
.
valueOf
(
uri
),
imageView
);
// GlideApp.with(mContext)
// .load(uri)
// .placeholder(R.drawable.default_error)
// .error(R.drawable.default_error)
// .into(imageView);
/*
imageView.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {
...
...
plugin_imcamera/src/main/java/com/xxfc/imcamera/view/ZoomImageView.java
View file @
ca1b3dd4
...
...
@@ -18,10 +18,10 @@ import android.view.View.OnTouchListener;
import
android.view.ViewTreeObserver
;
import
android.widget.ImageView
;
/**
* 支持放大的图片加载框架
*/
@SuppressLint
(
"AppCompatCustomView"
)
public
class
ZoomImageView
extends
ImageView
implements
OnScaleGestureListener
,
OnTouchListener
,
ViewTreeObserver
.
OnGlobalLayoutListener
{
public
static
final
float
SCALE_MAX
=
4.0f
;
...
...
@@ -90,15 +90,15 @@ public class ZoomImageView extends ImageView implements OnScaleGestureListener,
}
public
boolean
onSingleTapConfirmed
(
MotionEvent
e
)
{
// Intent intent = new Intent(com.sk.weichat.broadcast.OtherBroadcast.singledown
);
// FrameApp.getInstance
().sendBroadcast(intent);
Intent
intent
=
new
Intent
(
"singledown"
);
getContext
().
sendBroadcast
(
intent
);
return
false
;
}
@Override
public
void
onLongPress
(
MotionEvent
e
)
{
// Intent intent = new Intent(com.sk.weichat.broadcast.OtherBroadcast.longpress
);
// FrameApp.getInstance
().sendBroadcast(intent);
Intent
intent
=
new
Intent
(
"longpress"
);
getContext
().
sendBroadcast
(
intent
);
}
});
mScaleGestureDetector
=
new
ScaleGestureDetector
(
context
,
this
);
...
...
plugin_imcamera/src/main/res/layout/item_preview.xml
View file @
ca1b3dd4
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"vertical"
>
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"vertical"
>
<!--<uk.co.senab.photoview.PhotoView
android:id="@+id/iv_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>-->
<com.xxfc.imcamera.view.ZoomImageView
<!--<com.xxfc.imcamera.view.ZoomImageView-->
<!--android:id="@+id/iv_pager"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"/>-->
<com.base.utils.ui.image.pinch.PinchImageView
android:id=
"@+id/iv_pager"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"wrap_content"
android:scaleType=
"fitXY"
/>
</LinearLayout>
<!-- From: file:/Users/foamtrace/dev/AndroidStudioProjects/PhotoPicker/photopicker/src/main/res/layout/item_preview.xml -->
\ No newline at end of file
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