Google [站内搜索]

分类: Android编程预览模式: 普通 | 列表


网址前边是taobao://而不是http://,分析是淘宝电脑版页面判断出当前是手机用户,尝试调用淘宝客户端出错,将WebView.loadUrl方法中电脑版网页地址改成手机版网页地址即可:

webView.loadUrl("https://item.taobao.com/item.htm?id=38946217400");

查看更多...

分类:Android编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 37632

Google Play发布Android应用示例

在Google Play发布Android应用流程还是比较简单的,先注册一个 Google Play 发布者帐户(需支付25美元),然后上传应用并填写相关应用信息就可以发布了:



查看更多...

分类:Android编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2377
在AndroidManifest.xml配置去除应用标题栏,手机安装后一打开就出错:

<activity
    android:name=".MainActivity"
    android:theme="@android:style/Theme.NoTitleBar">

查看更多...

分类:Android编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4390

Android使用MediaPlayer播放mp3音乐示例

package com.mzwu.www;

import android.content.res.AssetFileDescriptor;
import android.media.MediaPlayer;
import android.support.v7.app.AppCompatActivity;

查看更多...

分类:Android编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3514

Playing Audio on Android from an HTML5 File[转]

Introduction

Earlier today, I came across a problem. I have been working on an App in Android that displays HTML5 files from the assets folder inside a WebView. One of the big problems with playing Audio in an HTML5 page is that a lot of browsers do not support the <audio> tag; this includes several versions of the WebView control in different versions of Android. The bottom line is that you can't expect standardized results across different versions of Android when using the HTML5 <audio> tag. So we're going to use a workaround that uses the native Android method of playing audio.

Here is a synopsis of the paragraphs below that describe how to implement the code.

查看更多...

分类:Android编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 5460

Androrid控件WebView使用示例



protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //setContentView(R.layout.activity_main);

查看更多...

分类:Android编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2211
今天意外发现移动手机端不能触发jQuery的dblclick事件,做了个简单的页面重现问题:

<input name="btn1" id="btn1" type="button" value="随便点">
<script type="text/javascript">
$(document).ready(function(){

查看更多...

分类:Android编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 24752

Android连续按两次返回键退出应用示例



import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.KeyEvent;

查看更多...

分类:Android编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2129


进入Android Studio安装文件夹,打开bin/idea.properties文件,在末尾添加下边内容即可解决:

disable.android.first.run=true

查看更多...

分类:Android编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3280

怎么查看安卓手机WiFi密码

安卓手机WiFi密码以明文形式保存在/data/misc/wifi/wpa_supplicant.conf文件中,安装Root Explorer、ES文件浏览器等应用赋于root权限打开该文件即可查看WiFi密码:

查看更多...

分类:Android编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2532