Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sobot_module_Dev
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
sobot_android
Sobot_module_Dev
Commits
52b2bd29
Commit
52b2bd29
authored
Feb 01, 2024
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widget 1.1.8 webview
parent
2c13748a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
183 additions
and
70 deletions
+183
-70
MainActivity.java
app/src/main/java/com/sobot/moduletest/MainActivity.java
+8
-0
sobot-widget-publish-mavencentral.gradle
sobot_widget/sobot-widget-publish-mavencentral.gradle
+1
-1
AndroidBug5497Workaround.java
...com/sobot/widget/ui/webview/AndroidBug5497Workaround.java
+64
-0
SobotWebViewActivity.java
...ava/com/sobot/widget/ui/webview/SobotWebViewActivity.java
+97
-61
sobot_activity_webview.xml
sobot_widget/src/main/res/layout/sobot_activity_webview.xml
+11
-8
dimens.xml
sobot_widget/src/main/res/values/dimens.xml
+2
-0
No files found.
app/src/main/java/com/sobot/moduletest/MainActivity.java
View file @
52b2bd29
...
@@ -27,6 +27,7 @@ import com.sobot.widget.ui.SobotMarkConfig;
...
@@ -27,6 +27,7 @@ import com.sobot.widget.ui.SobotMarkConfig;
import
com.sobot.widget.ui.base.SobotBaseActivity
;
import
com.sobot.widget.ui.base.SobotBaseActivity
;
import
com.sobot.widget.ui.rich.HtmlToolUtils
;
import
com.sobot.widget.ui.rich.HtmlToolUtils
;
import
com.sobot.widget.ui.toast.SobotToastUtil
;
import
com.sobot.widget.ui.toast.SobotToastUtil
;
import
com.sobot.widget.ui.webview.SobotWebViewActivity
;
import
java.io.File
;
import
java.io.File
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -247,6 +248,13 @@ public class MainActivity extends SobotBaseActivity {
...
@@ -247,6 +248,13 @@ public class MainActivity extends SobotBaseActivity {
// SobotLogUtils.i(SobotLoginTools.getInstance().getServiceInfo().getTimezone()+"----------------------------------"+SobotLoginTools.getInstance().getServiceInfo().getTimezoneId());
// SobotLogUtils.i(SobotLoginTools.getInstance().getServiceInfo().getTimezone()+"----------------------------------"+SobotLoginTools.getInstance().getServiceInfo().getTimezoneId());
// }
// }
// });
// });
// Intent intent = new Intent(MainActivity.this, SobotWebViewActivity.class);
// intent.putExtra("url", "https://www.sobot.com/ticketclient/index.html?sysNum=75574e5fa29a48458d1f57ab5489a4c5&deployId=442eb27d9c5c4ab9a3a21023f82207a9");
//// 是否隐藏头部导航栏 默认false显示, true 隐藏
// intent.putExtra("isHideTitleBar", true);
//// 是否隐藏底部工具栏 默认false显示, true 隐藏
// intent.putExtra("isHideToolBar", true);
// startActivity(intent);
}
}
@Override
@Override
...
...
sobot_widget/sobot-widget-publish-mavencentral.gradle
View file @
52b2bd29
...
@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
...
@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
ext
{
ext
{
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_ARTIFACT_ID
=
'widget_x'
//项目名
PUBLISH_ARTIFACT_ID
=
'widget_x'
//项目名
PUBLISH_VERSION
=
'1.1.
5
'
//版本号
PUBLISH_VERSION
=
'1.1.
8
'
//版本号
}
}
...
...
sobot_widget/src/main/java/com/sobot/widget/ui/webview/AndroidBug5497Workaround.java
0 → 100644
View file @
52b2bd29
package
com
.
sobot
.
widget
.
ui
.
webview
;
import
android.app.Activity
;
import
android.graphics.Rect
;
import
android.view.View
;
import
android.view.ViewTreeObserver
;
import
android.widget.FrameLayout
;
/**
* 解决WebView中输入时弹出软键盘,挡住输入框的问题
*/
public
class
AndroidBug5497Workaround
{
// For more information, see https://issuetracker.google.com/issues/36911528
// To use this class, simply invoke assistActivity() on an Activity that already has its content view set.
public
static
void
assistActivity
(
Activity
activity
)
{
new
AndroidBug5497Workaround
(
activity
);
}
private
View
mChildOfContent
;
private
int
usableHeightPrevious
;
private
FrameLayout
.
LayoutParams
frameLayoutParams
;
private
AndroidBug5497Workaround
(
Activity
activity
)
{
FrameLayout
content
=
(
FrameLayout
)
activity
.
findViewById
(
android
.
R
.
id
.
content
);
mChildOfContent
=
content
.
getChildAt
(
0
);
mChildOfContent
.
getViewTreeObserver
().
addOnGlobalLayoutListener
(
new
ViewTreeObserver
.
OnGlobalLayoutListener
()
{
public
void
onGlobalLayout
()
{
possiblyResizeChildOfContent
();
}
});
frameLayoutParams
=
(
FrameLayout
.
LayoutParams
)
mChildOfContent
.
getLayoutParams
();
}
private
int
frameLayoutHeight
=
0
;
private
void
possiblyResizeChildOfContent
()
{
int
usableHeightNow
=
computeUsableHeight
();
if
(
usableHeightNow
!=
usableHeightPrevious
)
{
int
usableHeightSansKeyboard
=
mChildOfContent
.
getRootView
().
getHeight
();
int
heightDifference
=
usableHeightSansKeyboard
-
usableHeightNow
;
if
(
heightDifference
>
(
usableHeightSansKeyboard
/
4
))
{
// keyboard probably just became visible
frameLayoutHeight
=
frameLayoutParams
.
height
;
// !!!修改前保存原有高度
frameLayoutParams
.
height
=
usableHeightSansKeyboard
-
heightDifference
;
}
else
{
// keyboard probably just became hidden
if
(
0
!=
frameLayoutHeight
)
{
frameLayoutParams
.
height
=
frameLayoutHeight
;
// !!!收起键盘恢复原有高度
}
}
mChildOfContent
.
requestLayout
();
usableHeightPrevious
=
usableHeightNow
;
}
}
private
int
computeUsableHeight
()
{
Rect
r
=
new
Rect
();
mChildOfContent
.
getWindowVisibleDisplayFrame
(
r
);
return
(
r
.
bottom
-
r
.
top
);
}
}
\ No newline at end of file
sobot_widget/src/main/java/com/sobot/widget/ui/webview/SobotWebViewActivity.java
View file @
52b2bd29
package
com
.
sobot
.
widget
.
ui
.
webview
;
package
com
.
sobot
.
widget
.
ui
.
webview
;
import
static
com
.
sobot
.
widget
.
ui
.
SobotBaseConstant
.
REQUEST_CODE_MAKEPICTUREFROMCAMERA
;
import
android.annotation.SuppressLint
;
import
android.annotation.SuppressLint
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
...
@@ -22,11 +24,15 @@ import android.widget.ProgressBar;
...
@@ -22,11 +24,15 @@ import android.widget.ProgressBar;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
androidx.annotation.Nullable
;
import
com.sobot.utils.SobotLogUtils
;
import
com.sobot.utils.SobotLogUtils
;
import
com.sobot.utils.SobotNetUtils
;
import
com.sobot.utils.SobotNetUtils
;
import
com.sobot.utils.SobotStringUtils
;
import
com.sobot.widget.R
;
import
com.sobot.widget.R
;
import
com.sobot.widget.ui.base.SobotBaseActivity
;
import
com.sobot.widget.ui.base.SobotBaseActivity
;
import
com.sobot.widget.ui.toast.SobotToastUtil
;
import
com.sobot.widget.ui.toast.SobotToastUtil
;
import
com.sobot.widget.ui.utils.SobotWidgetUtils
;
@SuppressLint
(
"SetJavaScriptEnabled"
)
@SuppressLint
(
"SetJavaScriptEnabled"
)
...
@@ -47,10 +53,16 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
...
@@ -47,10 +53,16 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
private
ImageView
sobot_webview_reload
;
private
ImageView
sobot_webview_reload
;
private
ImageView
sobot_webview_copy
;
private
ImageView
sobot_webview_copy
;
//根据
冲
入的url判断是否url true:是;false:不是
//根据
传
入的url判断是否url true:是;false:不是
private
boolean
isUrlOrText
=
true
;
private
boolean
isUrlOrText
=
true
;
@Override
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
AndroidBug5497Workaround
.
assistActivity
(
SobotWebViewActivity
.
this
);
}
@Override
protected
int
getContentViewResId
()
{
protected
int
getContentViewResId
()
{
return
R
.
layout
.
sobot_activity_webview
;
return
R
.
layout
.
sobot_activity_webview
;
}
}
...
@@ -81,13 +93,6 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
...
@@ -81,13 +93,6 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
@Override
@Override
protected
void
initView
()
{
protected
void
initView
()
{
setTitle
(
""
);
setTitle
(
""
);
showLeftMenu
(
getResDrawableId
(
"sobot_icon_back"
),
""
,
true
,
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
finish
();
}
});
mWebView
=
(
WebView
)
findViewById
(
R
.
id
.
sobot_mWebView
);
mWebView
=
(
WebView
)
findViewById
(
R
.
id
.
sobot_mWebView
);
mProgressBar
=
(
ProgressBar
)
findViewById
(
R
.
id
.
sobot_loadProgress
);
mProgressBar
=
(
ProgressBar
)
findViewById
(
R
.
id
.
sobot_loadProgress
);
sobot_rl_net_error
=
(
RelativeLayout
)
findViewById
(
R
.
id
.
sobot_rl_net_error
);
sobot_rl_net_error
=
(
RelativeLayout
)
findViewById
(
R
.
id
.
sobot_rl_net_error
);
...
@@ -108,37 +113,17 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
...
@@ -108,37 +113,17 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
sobot_webview_copy
.
setOnClickListener
(
this
);
sobot_webview_copy
.
setOnClickListener
(
this
);
sobot_webview_goback
.
setEnabled
(
false
);
sobot_webview_goback
.
setEnabled
(
false
);
sobot_webview_forward
.
setEnabled
(
false
);
sobot_webview_forward
.
setEnabled
(
false
);
displayInNotch
(
mWebView
);
displayInNotch
(
mWebView
);
boolean
isHideTitleBar
=
getIntent
().
getBooleanExtra
(
"isHideTitleBar"
,
false
);
resetViewDisplay
();
boolean
isHideToolBar
=
getIntent
().
getBooleanExtra
(
"isHideToolBar"
,
false
);
if
(
isHideTitleBar
&&
getToolBar
()
!=
null
)
{
getToolBar
().
setVisibility
(
View
.
GONE
);
}
initWebView
();
initWebView
();
if
(
isUrlOrText
)
{
resetViewDisplay
();
//加载url
if
(
isHideToolBar
&&
sobot_webview_toolsbar
!=
null
)
{
mWebView
.
loadUrl
(
mUrl
);
sobot_webview_toolsbar
.
setVisibility
(
View
.
GONE
);
sobot_webview_copy
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
//修改图片高度为自适应宽度
mUrl
=
"<!DOCTYPE html>\n"
+
"<html>\n"
+
" <head>\n"
+
" <meta charset=\"utf-8\">\n"
+
" <title></title>\n"
+
" <style>\n"
+
" img{\n"
+
" width: auto;\n"
+
" height:auto;\n"
+
" max-height: 100%;\n"
+
" max-width: 100%;\n"
+
" }\n"
+
" </style>\n"
+
" </head>\n"
+
" <body>"
+
mUrl
+
" </body>\n"
+
"</html>"
;
//显示文本内容
mWebView
.
loadDataWithBaseURL
(
"about:blank"
,
mUrl
.
replace
(
"</p>"
,
"<br/>"
).
replace
(
"<P>"
,
""
).
replace
(
"</P>"
,
"<br/>"
),
"text/html"
,
"utf-8"
,
null
);
}
}
SobotLogUtils
.
i
(
"webViewActivity---"
+
mUrl
);
}
}
@Override
@Override
...
@@ -196,6 +181,32 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
...
@@ -196,6 +181,32 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
mWebView
.
setVisibility
(
View
.
VISIBLE
);
mWebView
.
setVisibility
(
View
.
VISIBLE
);
sobot_webview_toolsbar
.
setVisibility
(
View
.
VISIBLE
);
sobot_webview_toolsbar
.
setVisibility
(
View
.
VISIBLE
);
sobot_rl_net_error
.
setVisibility
(
View
.
GONE
);
sobot_rl_net_error
.
setVisibility
(
View
.
GONE
);
if
(
isUrlOrText
)
{
//加载url
mWebView
.
loadUrl
(
mUrl
);
sobot_webview_copy
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
//修改图片高度为自适应宽度
mUrl
=
"<!DOCTYPE html>\n"
+
"<html>\n"
+
" <head>\n"
+
" <meta charset=\"utf-8\">\n"
+
" <title></title>\n"
+
" <style>\n"
+
" img{\n"
+
" width: auto;\n"
+
" height:auto;\n"
+
" max-height: 100%;\n"
+
" max-width: 100%;\n"
+
" }\n"
+
" </style>\n"
+
" </head>\n"
+
" <body>"
+
mUrl
+
" </body>\n"
+
"</html>"
;
//显示文本内容
mWebView
.
loadDataWithBaseURL
(
"about:blank"
,
mUrl
.
replace
(
"</p>"
,
"<br/>"
).
replace
(
"<P>"
,
""
).
replace
(
"</P>"
,
"<br/>"
),
"text/html"
,
"utf-8"
,
null
);
}
SobotLogUtils
.
i
(
"webViewActivity---"
+
mUrl
);
}
else
{
}
else
{
mWebView
.
setVisibility
(
View
.
GONE
);
mWebView
.
setVisibility
(
View
.
GONE
);
sobot_webview_toolsbar
.
setVisibility
(
View
.
GONE
);
sobot_webview_toolsbar
.
setVisibility
(
View
.
GONE
);
...
@@ -303,10 +314,34 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
...
@@ -303,10 +314,34 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
}
}
}
}
@Override
@Override
public
boolean
onShowFileChooser
(
WebView
webView
,
ValueCallback
<
Uri
[]>
filePathCallback
,
FileChooserParams
fileChooserParams
)
{
public
boolean
onShowFileChooser
(
WebView
webView
,
ValueCallback
<
Uri
[]>
filePathCallback
,
FileChooserParams
fileChooserParams
)
{
uploadMessageAboveL
=
filePathCallback
;
uploadMessageAboveL
=
filePathCallback
;
chooseAlbumPic
();
if
(
fileChooserParams
!=
null
&&
fileChooserParams
.
getAcceptTypes
()
!=
null
)
{
String
[]
acceptTypes
=
fileChooserParams
.
getAcceptTypes
();
String
acceptType
=
"*/*"
;
StringBuilder
sb
=
new
StringBuilder
();
if
(
acceptTypes
.
length
>
0
)
{
for
(
String
type
:
acceptTypes
)
{
sb
.
append
(
type
).
append
(
';'
);
}
}
if
(
sb
.
length
()
>
0
)
{
String
typeStr
=
sb
.
toString
();
acceptType
=
typeStr
.
substring
(
0
,
typeStr
.
length
()
-
1
);
}
SobotLogUtils
.
i
(
"input file 标签的accept类型:"
+
acceptType
+
fileChooserParams
.
getMode
());
//根据判断,触发相关的操作,如文件选择,拍照等
if
(
"image/*"
.
equals
(
SobotStringUtils
.
checkStringIsNull
(
acceptType
)))
{
openCapture
();
}
else
{
chooseFile
();
}
}
else
{
}
return
true
;
return
true
;
}
}
...
@@ -360,7 +395,6 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
...
@@ -360,7 +395,6 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
private
static
final
int
REQUEST_CODE_ALBUM
=
0x0111
;
private
static
final
int
REQUEST_CODE_ALBUM
=
0x0111
;
private
ValueCallback
<
Uri
>
uploadMessage
;
private
ValueCallback
<
Uri
[]>
uploadMessageAboveL
;
private
ValueCallback
<
Uri
[]>
uploadMessageAboveL
;
public
Context
getContext
()
{
public
Context
getContext
()
{
...
@@ -368,53 +402,52 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
...
@@ -368,53 +402,52 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
}
}
/**
/**
*
选择相册照片
*
打开相机拍照
*/
*/
private
void
chooseAlbumPic
()
{
private
void
openCapture
()
{
Intent
i
=
new
Intent
(
Intent
.
ACTION_GET_CONTENT
);
openCamera
();
i
.
addCategory
(
Intent
.
CATEGORY_OPENABLE
);
}
// i.setType("image/*");
i
.
setType
(
"video/*;image/*"
);
/**
startActivityForResult
(
Intent
.
createChooser
(
i
,
"Image Chooser"
),
REQUEST_CODE_ALBUM
);
* 打开文件系统选取文件上传
*/
private
void
chooseFile
()
{
Intent
intent
=
new
Intent
(
Intent
.
ACTION_GET_CONTENT
);
intent
.
setType
(
"*/*"
);
//设置类型,我这里是任意类型,任意后缀的可以这样写。
intent
.
addCategory
(
Intent
.
CATEGORY_OPENABLE
);
startActivityForResult
(
intent
,
REQUEST_CODE_ALBUM
);
}
}
@Override
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
requestCode
==
REQUEST_CODE_ALBUM
||
requestCode
==
REQUEST_CODE_MAKEPICTUREFROMCAMERA
)
{
if
(
requestCode
==
REQUEST_CODE_ALBUM
)
{
if
(
uploadMessageAboveL
==
null
)
{
if
(
uploadMessage
==
null
&&
uploadMessageAboveL
==
null
)
{
return
;
return
;
}
}
if
(
resultCode
!=
RESULT_OK
)
{
if
(
resultCode
!=
RESULT_OK
)
{
//一定要返回null,否则<input file> 就是没有反应
//一定要返回null,否则<input file> 就是没有反应
if
(
uploadMessage
!=
null
)
{
uploadMessage
.
onReceiveValue
(
null
);
uploadMessage
=
null
;
}
if
(
uploadMessageAboveL
!=
null
)
{
if
(
uploadMessageAboveL
!=
null
)
{
uploadMessageAboveL
.
onReceiveValue
(
null
);
uploadMessageAboveL
.
onReceiveValue
(
null
);
uploadMessageAboveL
=
null
;
uploadMessageAboveL
=
null
;
}
}
}
}
else
{
if
(
resultCode
==
RESULT_OK
)
{
if
(
resultCode
==
RESULT_OK
)
{
Uri
imageUri
=
null
;
Uri
imageUri
=
null
;
switch
(
requestCode
)
{
switch
(
requestCode
)
{
case
REQUEST_CODE_ALBUM:
case
REQUEST_CODE_ALBUM:
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
imageUri
=
data
.
getData
();
imageUri
=
data
.
getData
();
}
}
break
;
break
;
case
REQUEST_CODE_MAKEPICTUREFROMCAMERA:
if
(
cameraFile
!=
null
&&
cameraFile
.
exists
())
{
imageUri
=
SobotWidgetUtils
.
getUri
(
SobotWebViewActivity
.
this
,
cameraFile
);
}
}
break
;
//上传文件
if
(
uploadMessage
!=
null
)
{
uploadMessage
.
onReceiveValue
(
imageUri
);
uploadMessage
=
null
;
}
}
if
(
imageUri
!=
null
)
{
//上传文件
if
(
uploadMessageAboveL
!=
null
)
{
if
(
uploadMessageAboveL
!=
null
)
{
uploadMessageAboveL
.
onReceiveValue
(
new
Uri
[]{
imageUri
});
uploadMessageAboveL
.
onReceiveValue
(
new
Uri
[]{
imageUri
});
uploadMessageAboveL
=
null
;
uploadMessageAboveL
=
null
;
...
@@ -422,4 +455,6 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
...
@@ -422,4 +455,6 @@ public class SobotWebViewActivity extends SobotBaseActivity implements View.OnCl
}
}
}
}
}
}
}
}
}
}
\ No newline at end of file
sobot_widget/src/main/res/layout/sobot_activity_webview.xml
View file @
52b2bd29
...
@@ -5,7 +5,10 @@
...
@@ -5,7 +5,10 @@
android:background=
"@color/sobot_common_gray6"
android:background=
"@color/sobot_common_gray6"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<include
layout=
"@layout/sobot_common_layout_titlebar"
/>
<include
layout=
"@layout/sobot_common_layout_titlebar"
android:layout_height=
"@dimen/sobot_webview_titlebar_height"
android:layout_width=
"match_parent"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -19,11 +22,11 @@
...
@@ -19,11 +22,11 @@
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"5dip"
android:layout_height=
"5dip"
android:max=
"100"
android:max=
"100"
android:paddingStart=
"1dip"
android:paddingLeft=
"1dip"
android:paddingLeft=
"1dip"
android:paddingRight=
"1dip"
android:progress=
"0"
android:paddingEnd=
"1dip"
android:paddingEnd=
"1dip"
android:paddingStart=
"1dip"
/>
android:paddingRight=
"1dip"
android:progress=
"0"
/>
<com.sobot.widget.ui.webview.CustomWebview
<com.sobot.widget.ui.webview.CustomWebview
android:id=
"@+id/sobot_mWebView"
android:id=
"@+id/sobot_mWebView"
...
@@ -34,8 +37,8 @@
...
@@ -34,8 +37,8 @@
<LinearLayout
<LinearLayout
android:id=
"@+id/sobot_webview_toolsbar"
android:id=
"@+id/sobot_webview_toolsbar"
android:layout_height=
"@dimen/sobot_webview_toolsbar_height"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<View
<View
...
@@ -48,10 +51,10 @@
...
@@ -48,10 +51,10 @@
android:layout_height=
"43dp"
android:layout_height=
"43dp"
android:background=
"@color/sobot_white"
android:background=
"@color/sobot_white"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingLeft=
"15dp"
android:paddingRight=
"15dp"
android:paddingStart=
"15dp"
android:paddingStart=
"15dp"
android:paddingEnd=
"15dp"
>
android:paddingLeft=
"15dp"
android:paddingEnd=
"15dp"
android:paddingRight=
"15dp"
>
<ImageView
<ImageView
android:id=
"@+id/sobot_webview_goback"
android:id=
"@+id/sobot_webview_goback"
...
...
sobot_widget/src/main/res/values/dimens.xml
View file @
52b2bd29
...
@@ -3,5 +3,7 @@
...
@@ -3,5 +3,7 @@
<dimen
name=
"sobot_titlebar_height"
>
44dp
</dimen>
<dimen
name=
"sobot_titlebar_height"
>
44dp
</dimen>
<dimen
name=
"sobot_titlebar_title_size"
>
16sp
</dimen>
<dimen
name=
"sobot_titlebar_title_size"
>
16sp
</dimen>
<dimen
name=
"sobot_webview_titlebar_height"
>
@dimen/sobot_titlebar_height
</dimen>
<dimen
name=
"sobot_webview_toolsbar_height"
>
@dimen/sobot_titlebar_height
</dimen>
</resources>
</resources>
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