文章列表
服务器端:
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;
public class Server {
/** 端口号 */
public static final int PORT = 9999;
public static void ...
public ProgressDialog pBar;
private Handler handler = new Handler();
public void updatedialog(){
Dialog dialog = new AlertDialog.Builder(index.this).setTitle("系统更新")
.setMessage("发现新版本,请更新!")// 设置内容
.setPositiveButton("确定",// 设置确定 ...
android客户端用hessian往服务端传值处理业务,奇怪的是服务端业务已经处理成功了,客户端却报个错
搞了半天才发现,需要加一行代码才正常运行
String url = "http://xxx.xxx.x.xxx:xxx/";
HessianProxyFactory hessianProxy = new HessianProxyFactory();
hessianProxy.setReadTimeout(10000);
IServiceAction webServices = (IServiceActi ...
继承AppWidgetProvider的类不能用TextView x = (TextView)findViewById(R.id.x)
只能用RemoteView中的setInt(int viewId, String methodName, int value) 来搭配View中的setBackgroundResource (int resid)
xxx.setInt(R.id.widget, "setBackgroundResource ",R.drawable.carrystick_bg1)
BatteyAppWidget.java
package widget.irdc;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.widget.RemoteViews;
public class Batte ...