小编use*_*425的帖子

使用JPEG作为PNG的Android背景

我想询问Android是否接受JPEG图像而不是PNG,因为PNG具有更大的文件大小感谢JPEG,所以我想知道如何在layout.xml上使用JPEG作为背景图像.

layout png android jpeg

6
推荐指数
1
解决办法
7842
查看次数

字符串无法强制转换为org.ksoap2.serialization.SoapPrimitive

我有webservice返回字符串值"1"或"-1",数字但在字符串中.

我在使用无法从字符串转换为org.ksoap2.serialization.SoapPrimitive的Asunc任务时出错

完整的AsuncTask类代码:

 public class LoginAsync extends AsyncTask<Void, Void, String> {

Activity mActivity;
Context context;

ProgressDialog progressDialog;

public LoginAsync(Activity activity, ProgressDialog progressDialog,
        Context context) {
    super();
    this.progressDialog = progressDialog;
    this.mActivity = activity;
    this.context = context;
}

@Override
protected String doInBackground(Void... voids) {
    SoapPrimitive resultRequestSOAP = null;

    try {
        final String NAMESPACE = "http://ws.sams.com";
        final String URL = "http://sams-app.com:8080/webService/services/LoginActvityWs?WSDL"; // usint
                                                                                                // //
                                                                                                // //
                                                                                                // //
                                                                                                // localhost
        final String METHOD_NAME = "login";
        final String SOAP_ACTION = "http://ws.sams.com/login";

        SharedPreferences prefs …
Run Code Online (Sandbox Code Playgroud)

java android android-ksoap2 android-asynctask

2
推荐指数
2
解决办法
2万
查看次数

标签 统计

android ×2

android-asynctask ×1

android-ksoap2 ×1

java ×1

jpeg ×1

layout ×1

png ×1