我正在使用包含webview的scrollview,它在2.3,4.1上工作得很完美,但是当我在4.4模拟器上尝试它时,它显示
View too large to fit into drawing cache, needs 5744640 bytes, only 3932160 available
Run Code Online (Sandbox Code Playgroud)
webview只是空白.
这是布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dp" >
<TextView
android:id="@+id/newsTitle"
android:textSize="18sp"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/last_update" />
<WebView
android:id="@+id/newsContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/last_update" />
<TextView
android:id="@+id/newsDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/last_update" />
</LinearLayout>
</ScrollView>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我尝试使用,mywebView.setDrawingCacheEnabled(false);但它只是返回相同的警告.
此外,我发现当网页超大屏幕时会出现问题,但是当我显示它时,我发现网页的布局略有不同,在2.3,4.1中,如果单词超出页面,它可以简单地启动新行然而,在4.4它没有,所以这个词的一部分是在屏幕之外.
怎么解决?谢谢
最近我在实施SSL的项目上工作.
SSL证书每年到期一次.在我更新服务器上的证书后,它在android中抛出异常.
06-13 11:20:27.709:D/allenj(30076):javax.net.ssl.SSLHandshakeException:java.security.cert.CertPathValidatorException:未找到证书路径的信任锚.
在查看项目代码后,我看到有一个bks文件,所以,这是否意味着每年必须更新一次bks文件,我还必须将应用程序重新上传到Google Play.
问题是应对SSL证书更新的标准方法是什么?谢谢你的帮助.
代码提取
nnable Register_runnable = new Runnable(){
@Override
public void run() {
EditText emailText = (EditText) findViewById(R.id.editText1regist);
EditText pwText = (EditText) findViewById(R.id.editText2registpw);
String end = "\r\n";
String twoHyphens = "--";
String boundary = "*****";
try {
KeyStore keyStore = KeyStore.getInstance("BKS");
InputStream in =
getResources().openRawResource(R.raw.ballooncardbks);
keyStore.load(in, "".toCharArray());
TrustManagerFactory tmf =
TrustManagerFactory.getInstance("X509");
tmf.init(keyStore);
SSLContext context = SSLContext.getInstance("TLS");
context.init(null, tmf.getTrustManagers(), null);
String actionUrl = "https://app.ballooncard.com/api/client/register/format/json";
URL url = new URL(actionUrl);
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
// con.setDoInput(true); …Run Code Online (Sandbox Code Playgroud) 最近我使用prestashop创建了一个eshop网站
https://www.prestashop.com/en/
因为我要为它构建Android应用程序.应用程序中包含的内容只是一些基本功能
例如,创建客户帐户/列表产品/订单产品/支付/查看订单等.常见的eshop功能...
问题是似乎周围的资源很少.是否有任何库/官方的/或者我需要从stratch开始创建API?
阅读 http://doc.prestashop.com/display/PS16/Developer+Guide一段时间,但不知道到目前为止我需要从什么开始.
这是一个相当抽象的问题,但由于社区不是那么受欢迎且资源有限,我希望这可以从对方的经验中学习,并帮助其他人提出相同的要求.
非常感谢您的帮助
我按照他们的说明实现了addThis共享框.我想在共享工具框中仅包含以下服务,这些服务在桌面浏览器上工作正常但在移动设备上被忽略,这意味着每个服务都显示在共享框的移动版本上.
其他人遇到过这个问题?可以做些什么来解决它?
<script src="https://s7.addthis.com/js/300/addthis_widget.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div class="share_btn">Press me to test sharing!!!!</div>
<script>
var addthis_config = {
services_expanded: 'facebook,twitter,email,tumblr,link,sinaweibo,whatsapp'
}
$(".share_btn").on("click", function () {
addthis.update('share', 'url', 'http://google.com');
addthis_sendto('more');
});
</script>Run Code Online (Sandbox Code Playgroud)
这是我的代码的摘录,显示excel条目和存储到数组中.
首先是逻辑,检测哪个条目无效,将其标记为低,然后对于其他有效条目,检查它是否重复,如果是,则将其标记为低.
最后,再次扫描整个工作表,检索不在该两个列表中的所有条目.(重复或无效)
问题是:
1)当我显示表格时,虽然它可以显示,但它警告我"数据表警告:从第0行的数据源请求未知参数'0'"
2)当我存储到数组中时,它只能存储第一行
所以,我想知道我的循环逻辑有什么错误吗?我是否使用PHPEXCEL以正确的方式阅读电子表格?谢谢.
$reader = PHPExcel_IOFactory::createReader($readerType);
$PHPExcel = $reader->load($file);
$sheet = $PHPExcel->getSheet(0);
$highestRow = $sheet->getHighestRow();
$highestColumn = PHPExcel_Cell::columnIndexFromString($sheet->getHighestColumn());
$pattern="/^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$/";
for ($row = 1; $row <= $highestRow; $row++){
for ($head = 0; $head < $highestColumn; $head++){
$testMail = $sheet->getCellByColumnAndRow($head, $row)->getValue();
if (preg_match($pattern,$testMail))
$mailColumn=$head;
}}
if(!isset($mailColumn))
{die('No email column detected, please check your file and import again.');}
$invaild[] = NULL ;
$email[] = NULL ;
$duplicate[] = NULL ;
for ($row = 1; $row <= $highestRow; $row++) { …Run Code Online (Sandbox Code Playgroud) 当我在CKEditor中发布图像时,该链接将在实际URL开始之前添加服务器根地址.为什么它表现得那样,我该如何解决呢?
谢谢.
示例错误:
这就是html格式的样子
<img id="\"headerImage" campaign-icon\"="" mc:allowdesigner="\"\"" mc:allowtext="\"\"" mc:edit="\"header_image\"" mc:label="\"header_image\"" src="\"http://gallery.mailchimp.com/653153ae841fd11de66ad181a/images/placeholder_600.gif\"" style="\"max-width:600px;\"">
Run Code Online (Sandbox Code Playgroud) 在PHP中,我可以像这样向数组添加一个值:
array[]=1;
array[]=2;
Run Code Online (Sandbox Code Playgroud)
并且输出将是 0=>'1', 1=>'2';
如果我在javascript中尝试相同的代码,它将返回Uncaught SyntaxError:Unexpected string.那么,JS中有没有什么方法可以像PHP一样工作?谢谢
我目前正在开发一个简单的php网站
问题是,我的整个网站中的图像(发生在所有php文件中)随机损坏并显示错误 资源解释为图像但是使用MIME类型text/html传输,但是,如果我尝试刷新页面几次.可以再次加载图像,错误消失.
我检查了所有img路径,图像存在.另外,我检查img src=""了我的文件中没有.是由于服务器设置?我检查.htaccess文件,它是空白的.如何解决问题?谢谢
Chrome网站开发者:
Request URL:http://goodbyedear.com.hk/images/index_48.jpg
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control:max-age=0
Connection:keep-alive
Cookie:PHPSESSID=ee5297bd4973576b6a318cd9a33c4151; aaaaaaa=96b0422aaaaaaaa_96b0422a
Host:goodbyedear.com.hk
If-Modified-Since:Mon, 21 Oct 2013 17:59:24 GMT
Referer:http://goodbyedear.com.hk/index.php
User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Response Headersview source
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Close
Content-Length:144
Expires:Sat, 6 May 1995 12:00:00 GMT
P3P:CP=NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM
Pragma:no-cache
Run Code Online (Sandbox Code Playgroud)
我的代码(供参考):
<?php
session_start();
require_once('db_connect.php');
?>
<!DOCTYPE html PUBLIC …Run Code Online (Sandbox Code Playgroud) 我正在使用Facebook SDK,问题是FormSubmit函数已经运行了两次.它是由被称为getView是通过调用函数onCreateView和由statusCallback,如何解决呢?
public class Home extends Fragment implements LoginListener {
public View rootView;
public ImageView HomeBg;
public ImageView buttonLoginLogout;
public TextView chi;
public TextView eng;
public ColorStateList oldColor;
public SharedPreferences prefs;
public EasyTracker tracker = null;
//Facebook login
private Session.StatusCallback statusCallback = new SessionStatusCallback();
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
tracker = EasyTracker.getInstance(getActivity());
prefs = getActivity().getSharedPreferences("memberData", 0);
getActivity().getActionBar().hide();
rootView = inflater.inflate(R.layout.home, container, false);
buttonLoginLogout = (ImageView) rootView.findViewById(R.id.home_connectFB);
eng = (TextView) …Run Code Online (Sandbox Code Playgroud) 当我尝试在webview中显示Google日历时,会显示一些错误:
[INFO:CONSOLE(0)] "Refused to display 'https://accounts.google.com/ServiceLogin?service=cl&passive=1209600&continue=https://www.google.com/calendar/embed?src%3Detlwhk@gmail.com%26ctz%3DAsia/Hong_Kong&followup=https://www.google.com/calendar/embed?src%3Detlwhk@gmail.com%26ctz%3DAsia/Hong_Kong&btmpl=mobile<mpl=mobilex&scc=1' in a frame because it set 'X-Frame-Options' to 'DENY'.", source: about:blank (0)
Run Code Online (Sandbox Code Playgroud)
这是HTML代码
<p><iframe style="border: 0;" src="https://www.google.com/calendar/embed?src=etlwhk%40gmail.com&ctz=Asia/Hong_Kong&output=embed" width="800" height="600" frameborder="0" scrolling="no"></iframe></p>
Run Code Online (Sandbox Code Playgroud)
而对于android方面,它是一些简单的webview代码
StringBuilder sb = new StringBuilder();
sb.append("<HTML><HEAD><meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'><style>img{display: inline; height: auto; max-width: 100%}iframe{width:100%}</style></HEAD><body>");
sb.append(page.page_content_chi.toString());
sb.append("</body></HTML>");
webview.loadDataWithBaseURL("file:///android_asset/", sb.toString(), "text/html", "utf-8", null);
Run Code Online (Sandbox Code Playgroud)
如何修复错误?谢谢你的帮助.