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
17ef6134
Commit
17ef6134
authored
Dec 12, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
活动修复
parent
3862f044
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
4 deletions
+101
-4
MainActivity.java
RvClient/src/main/java/com/xxfc/rv/MainActivity.java
+27
-0
rv_dialog_conference_event.xml
...dialog/src/main/res/layout/rv_dialog_conference_event.xml
+2
-2
dimens.xml
component_dialog/src/main/res/values-hdpi/dimens.xml
+9
-0
dimens.xml
component_dialog/src/main/res/values-xhdpi/dimens.xml
+9
-0
dimens.xml
component_dialog/src/main/res/values-xxhdpi/dimens.xml
+11
-0
TransformationUtils10.java
...c/main/java/com/rv/share/utils/TransformationUtils10.java
+41
-0
RvWebView.java
plugin_share/src/main/java/com/rv/share/view/RvWebView.java
+2
-2
No files found.
RvClient/src/main/java/com/xxfc/rv/MainActivity.java
View file @
17ef6134
...
...
@@ -9,6 +9,7 @@ import android.content.Context;
import
android.content.Intent
;
import
android.content.IntentFilter
;
import
android.content.ServiceConnection
;
import
android.graphics.Bitmap
;
import
android.location.LocationManager
;
import
android.net.ConnectivityManager
;
import
android.net.Uri
;
...
...
@@ -24,6 +25,7 @@ import android.text.TextUtils;
import
android.util.Log
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
android.widget.Toast
;
...
...
@@ -31,6 +33,8 @@ import android.widget.Toast;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.base.utils.ui.image.round.RoundImageView
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.request.target.SimpleTarget
;
import
com.bumptech.glide.request.transition.Transition
;
import
com.frame.base.url.Constance
;
import
com.frame.base.url.ImageUrl
;
import
com.frame.rv.config.RvFrameConfig
;
...
...
@@ -81,6 +85,7 @@ import com.rv.plugin.calendar.bean.PreRentDaysBean;
import
com.rv.rvmine.MineFragment
;
import
com.rv.share.WebViewActivity
;
import
com.rv.share.utils.TransformationUtils
;
import
com.rv.share.utils.TransformationUtils10
;
import
com.rv.share.view.PromotionDialog
;
import
com.rv.tourism.R2
;
import
com.rv.tourism.TourismFragment
;
...
...
@@ -730,10 +735,13 @@ public class MainActivity extends BaseActivity<CommonPresenter> implements DownL
/**
* 发布会活动
*/
int
width2
;
int
height2
;
private
void
showConferenceEvent
(
CodeInfoBean
codeInfoBean
)
{
if
(
codeInfoBean
==
null
||
codeInfoBean
.
getData
()
==
null
)
{
return
;
}
new
ConferenceEventDialog
(
mActivity
)
{
@Override
public
void
helper
(
ViewHolder
helper
)
{
...
...
@@ -749,6 +757,25 @@ public class MainActivity extends BaseActivity<CommonPresenter> implements DownL
.
apply
(
options
)
.
into
(
new
TransformationUtils
((
ImageView
)
helper
.
getView
(
R
.
id
.
img_bg
)));
// //获取图片真正的宽高
// Glide.with(MainActivity.this)
// .asBitmap()//强制Glide返回一个Bitmap对象
// .load(ImageUrl.IMG_APP_BG_ACTIVITY_50)
// .into(new SimpleTarget<Bitmap>() {
// @Override
// public void onResourceReady(@NonNull Bitmap bitmap, @Nullable Transition<? super Bitmap> transition) {
// width2 = bitmap.getWidth();
// height2 = bitmap.getHeight();
// }
// });
//
// Glide.with(MainActivity.this)
// .asBitmap()
// .load(ImageUrl.IMG_APP_BG_ACTIVITY_50)
// .apply(options)
// .into(new TransformationUtils10((ImageView) helper.getView(R.id.img_bg),width2,height2));
helper
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
...
...
component_dialog/src/main/res/layout/rv_dialog_conference_event.xml
View file @
17ef6134
...
...
@@ -44,8 +44,8 @@
android:layout_marginLeft=
"@dimen/size_10"
android:layout_marginTop=
"@dimen/size_20"
android:layout_marginRight=
"@dimen/size_10"
android:minWidth=
"@dimen/
size_150
"
android:minHeight=
"@dimen/
size_150
"
/>
android:minWidth=
"@dimen/
dialog_act_width
"
android:minHeight=
"@dimen/
dialog_act_height
"
/>
<TextView
...
...
component_dialog/src/main/res/values-hdpi/dimens.xml
0 → 100644
View file @
17ef6134
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen
name=
"dialog_width"
>
150dp
</dimen>
<dimen
name=
"dialog_min_height"
>
150dp
</dimen>
<dimen
name=
"dialog_act_width"
>
150dp
</dimen>
<dimen
name=
"dialog_act_height"
>
150dp
</dimen>
<dimen
name=
"height_share_ruler_top"
>
108.34dp
</dimen>
</resources>
component_dialog/src/main/res/values-xhdpi/dimens.xml
0 → 100644
View file @
17ef6134
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen
name=
"dialog_width"
>
200dp
</dimen>
<dimen
name=
"dialog_min_height"
>
200dp
</dimen>
<dimen
name=
"dialog_act_width"
>
200dp
</dimen>
<dimen
name=
"dialog_act_height"
>
200dp
</dimen>
<dimen
name=
"height_share_ruler_top"
>
240.45dp
</dimen>
</resources>
component_dialog/src/main/res/values-xxhdpi/dimens.xml
0 → 100644
View file @
17ef6134
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen
name=
"dialog_width"
>
300dp
</dimen>
<dimen
name=
"dialog_min_height"
>
300dp
</dimen>
<dimen
name=
"dialog_act_width"
>
300dp
</dimen>
<dimen
name=
"dialog_act_height"
>
300dp
</dimen>
<dimen
name=
"height_share_ruler_top"
>
216.67dp
</dimen>
</resources>
plugin_share/src/main/java/com/rv/share/utils/TransformationUtils10.java
0 → 100644
View file @
17ef6134
package
com
.
rv
.
share
.
utils
;
import
android.graphics.Bitmap
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
com.bumptech.glide.request.target.ImageViewTarget
;
public
class
TransformationUtils10
extends
ImageViewTarget
<
Bitmap
>
{
private
int
width
;
private
int
height
;
private
ImageView
target
;
public
TransformationUtils10
(
ImageView
target
,
int
width
,
int
height
)
{
super
(
target
);
this
.
target
=
target
;
this
.
width
=
width
;
this
.
height
=
height
;
}
@Override
protected
void
setResource
(
Bitmap
resource
)
{
target
.
setImageBitmap
(
resource
);
if
(
resource
==
null
)
return
;
//获取原图的宽高
// int width = resource.getWidth();
// int height = resource.getHeight();
//获取imageView的宽
int
imageViewWidth
=
target
.
getWidth
();
//计算缩放比例
float
sy
=
(
float
)
(
imageViewWidth
*
0.1
)
/
(
float
)
(
width
*
0.1
);
//计算图片等比例放大后的高
int
imageViewHeight
=
(
int
)
(
height
*
sy
);
ViewGroup
.
LayoutParams
params
=
target
.
getLayoutParams
();
params
.
height
=
imageViewHeight
;
target
.
setLayoutParams
(
params
);
}
}
\ No newline at end of file
plugin_share/src/main/java/com/rv/share/view/RvWebView.java
View file @
17ef6134
...
...
@@ -50,13 +50,13 @@ public class RvWebView extends WebView {
// 支持 Js 使用
webSettings
.
setJavaScriptEnabled
(
true
);
// 开启DOM缓存,默认状态下是不支持LocalStorage的
webSettings
.
setDomStorageEnabled
(
true
);
//
webSettings.setDomStorageEnabled(true);
// 开启数据库缓存
webSettings
.
setDatabaseEnabled
(
true
);
// 支持自动加载图片
webSettings
.
setLoadsImagesAutomatically
(
hasKitkat
());
// 设置 WebView 的缓存模式
webSettings
.
setCacheMode
(
WebSettings
.
LOAD_DEFAULT
);
//
webSettings.setCacheMode(WebSettings.LOAD_DEFAULT);
// 支持启用缓存模式
webSettings
.
setAppCacheEnabled
(
true
);
// 设置 AppCache 最大缓存值(现在官方已经不提倡使用,已废弃)
...
...
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