Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
92ff78af
authored
Jan 16, 2024
by
wukun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
93cabfd2
def725c9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
25 deletions
baseSDK/src/main/res/layout/activity_webview.xml
orderCenter/src/main/java/com/dayu/order/ui/activity/PdfWebViewActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/WebViewActivity.java
baseSDK/src/main/res/layout/activity_webview.xml
View file @
92ff78af
...
...
@@ -21,12 +21,13 @@
/>
<TextView
android:id=
"@+id/tv_right_title"
style=
"@style/title_right_text"
android:textSize=
"15sp"
android:visibility=
"gone"
android:text=
"下载"
/>
<!-- <TextView-->
<!-- android:id="@+id/tv_right_title"-->
<!-- style="@style/title_right_text"-->
<!-- android:textSize="15sp"-->
<!-- android:text="下载" />-->
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/PdfWebViewActivity.java
View file @
92ff78af
...
...
@@ -50,15 +50,15 @@ public class PdfWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
mBind
.
tvTitle
.
setText
(
title
);
initWebView
();
mBind
.
tvRightTitle
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_VIEW
);
intent
.
setData
(
Uri
.
parse
(
docPath
));
// startActivity(Intent.createChooser(intent, "Choose browser"));
startActivity
(
intent
);
}
});
//
mBind.tvRightTitle.setOnClickListener(new View.OnClickListener() {
//
@Override
//
public void onClick(View v) {
//
Intent intent = new Intent(Intent.ACTION_VIEW);
//
intent.setData(Uri.parse(docPath));
//
//
startActivity(Intent.createChooser(intent, "Choose browser"));
//
startActivity(intent);
//
}
//
});
}
private
void
initWebView
()
{
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/WebViewActivity.java
View file @
92ff78af
...
...
@@ -52,17 +52,17 @@ public class WebViewActivity extends DataBindingActivity<ActivityWebviewBinding>
mId
=
bundle
.
getInt
(
Constants
.
ID
);
mUrl
=
Constants
.
WEB_ZHI_SHI
+
"?id="
+
mId
;
mBind
.
tvTitle
.
setText
(
getResources
().
getString
(
R
.
string
.
order_instruction
));
mBind
.
tvRightTitle
.
setText
(
getResources
().
getString
(
R
.
string
.
open_webview
));
mBind
.
tvRightTitle
.
setVisibility
(
View
.
VISIBLE
);
//
mBind.tvRightTitle.setText(getResources().getString(R.string.open_webview));
//
mBind.tvRightTitle.setVisibility(View.VISIBLE);
mBind
.
titleBack
.
setOnClickListener
(
o
->
finish
());
mBind
.
tvRightTitle
.
setOnClickListener
(
o
->
{
Intent
intent
=
new
Intent
();
intent
.
setAction
(
Intent
.
ACTION_VIEW
);
Uri
content_url
=
Uri
.
parse
(
mUrl
);
intent
.
setData
(
content_url
);
startActivity
(
Intent
.
createChooser
(
intent
,
getResources
().
getString
(
R
.
string
.
select_webview
)));
// MobclickAgent.onEvent(mActivity,"open_web");
});
//
mBind.tvRightTitle.setOnClickListener(o -> {
//
Intent intent = new Intent();
//
intent.setAction(Intent.ACTION_VIEW);
//
Uri content_url = Uri.parse(mUrl);
//
intent.setData(content_url);
//
startActivity(Intent.createChooser(intent, getResources().getString(R.string.select_webview)));
//
//
MobclickAgent.onEvent(mActivity,"open_web");
//
});
UserInfo
userInfo
=
UserManager
.
getInstance
().
getUser
();
mToken
=
userInfo
.
getToken
();
mWebView
=
new
BridgeWebView
(
mActivity
);
...
...
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