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
18f6896e
Commit
18f6896e
authored
Aug 22, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除不需要的文件
parent
8e304a84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
50 deletions
+0
-50
ProgressWebView.java
...c/main/java/com/rv/component/control/ProgressWebView.java
+0
-50
No files found.
component_control/src/main/java/com/rv/component/control/ProgressWebView.java
deleted
100644 → 0
View file @
8e304a84
package
com
.
rv
.
component
.
control
;
import
android.content.Context
;
import
android.graphics.drawable.Drawable
;
import
android.util.AttributeSet
;
import
android.webkit.WebView
;
import
android.widget.LinearLayout
;
import
android.widget.ProgressBar
;
public
class
ProgressWebView
extends
WebView
{
private
ProgressBar
mProgressBar
;
public
ProgressWebView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
mProgressBar
=
new
ProgressBar
(
context
,
null
,
android
.
R
.
attr
.
progressBarStyleHorizontal
);
LinearLayout
.
LayoutParams
layoutParams
=
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
8
);
mProgressBar
.
setLayoutParams
(
layoutParams
);
Drawable
drawable
=
context
.
getResources
().
getDrawable
(
R
.
drawable
.
shape_rv_bg_yellow_progress_hint
);
mProgressBar
.
setProgressDrawable
(
drawable
);
addView
(
mProgressBar
);
setWebChromeClient
(
new
WebChromeClient
());
}
public
class
WebChromeClient
extends
android
.
webkit
.
WebChromeClient
{
@Override
public
void
onProgressChanged
(
WebView
view
,
int
newProgress
)
{
if
(
newProgress
==
100
)
{
mProgressBar
.
setVisibility
(
GONE
);
}
else
{
if
(
mProgressBar
.
getVisibility
()
==
GONE
)
mProgressBar
.
setVisibility
(
VISIBLE
);
mProgressBar
.
setProgress
(
newProgress
);
}
super
.
onProgressChanged
(
view
,
newProgress
);
}
}
@Override
protected
void
onScrollChanged
(
int
l
,
int
t
,
int
oldl
,
int
oldt
)
{
LayoutParams
lp
=
(
LayoutParams
)
mProgressBar
.
getLayoutParams
();
lp
.
x
=
l
;
lp
.
y
=
t
;
mProgressBar
.
setLayoutParams
(
lp
);
super
.
onScrollChanged
(
l
,
t
,
oldl
,
oldt
);
}
}
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