2016-08-05 103 views
0

我让它工作得很好......我给应用程序添加了一些活动,现在没有显示“进度对话框”的动画方面。 “进度对话框”弹出窗口显示,但小圆圈动画图标不显示。这里有一些注意事项:没有显示进度对话动画?

1)它不适用于我的应用程序中的任何活动。任何使用“进度对话框”弹出窗口的活动不再显示动画。

2.)我对应用程序进行了更改,但未对使用“进度对话框”的任何活动或类进行更改。

3.)它似乎是我的手机(Moto X Pure)特有的东西,因为它可以在我妻子的手机(LG G2)上正常工作。

我读了几篇文章,似乎表明它可能是我的开发选项设置的问题,但我没有看到任何看起来不正确的东西。我有Window动画缩放比例,Transition动画缩放比例和Animator持续时间缩放比例都设置为1x。

这是我的代码。这是从我的LoginActivity,但正如我所说,它不属别类的工作,以及:

import java.util.ArrayList; 
import java.util.List; 

import org.apache.http.NameValuePair; 
import org.apache.http.message.BasicNameValuePair; 
import org.json.JSONException; 
import org.json.JSONObject; 

import android.app.ProgressDialog; 
import android.content.Intent; 
import android.os.AsyncTask; 
import android.os.Bundle; 
import android.support.v7.app.ActionBarActivity; 
import android.util.Log; 
import android.view.View; 
import android.view.View.OnClickListener; 
import android.view.Window; 
import android.widget.Button; 
import android.widget.EditText; 
import android.widget.Toast; 

public class LoginActivity extends ActionBarActivity implements OnClickListener { 

    private EditText user, pass; 
    private Button mSubmit, mRegister; 

    // Progress Dialog 
    private ProgressDialog pDialog; 

    ... 

    @Override 
    protected void onCreate(Bundle savedInstanceState) { 

     super.onCreate(savedInstanceState); 
     this.supportRequestWindowFeature(Window.FEATURE_NO_TITLE); 
     setContentView(R.layout.activity_login); 



     //setup input fields 
     user = (EditText)findViewById(R.id.username); 
     pass = (EditText)findViewById(R.id.password); 

     //setup buttons 
     mSubmit = (Button)findViewById(R.id.login); 
     mRegister = (Button)findViewById(R.id.register); 

     //register listeners 
     mSubmit.setOnClickListener(this); 
     mRegister.setOnClickListener(this); 

    } 

    @Override 
    public void onClick(View v) { 

     switch (v.getId()) { 
      case R.id.login: 
       new AttemptLogin().execute(); 
       break; 
      case R.id.register: 
       Intent i = new Intent(this, RegisterActivity.class); 
       startActivity(i); 
       //finish(); 
       break; 

      default: 
       break; 
     } 
    } 

    class AttemptLogin extends AsyncTask<String, String, String> { 

     /** 
     * Before starting background thread Show Progress Dialog 
     * */ 
     boolean failure = false; 

     @Override 
     protected void onPreExecute() { 
      super.onPreExecute(); 
      pDialog = new ProgressDialog(LoginActivity.this); 
      pDialog.setMessage("Attempting login..."); 
      pDialog.setIndeterminate(false); 
      pDialog.setCancelable(true); 
      pDialog.show(); 
     } 

     @Override 
     protected String doInBackground(String... args) { 

      ... 

     } 

     protected void onPostExecute(String file_url) { 
      // dismiss the dialog once product deleted 
      pDialog.dismiss(); 

      ... 

      } 

     } 

    } 

} 

编辑:

另外,我似乎得到错误的一个不寻常的量。这里是我的LogCat输出:

08-04 20:37:04.656 21761-21761/online.tipme.app I/art: Late-enabling -Xcheck:jni 
08-04 20:37:04.702 21761-21761/online.tipme.app W/ActivityThread: Application online.tipme.app can be debugged on port 8100... 
08-04 20:37:04.704 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=19] 
08-04 20:37:04.704 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/app/online.tipme.app-2/oat/arm64/base.odex". Will use given name. 
08-04 20:37:04.706 21761-21761/online.tipme.app W/System: ClassLoader referenced unknown path: /data/app/online.tipme.app-2/lib/arm64 
08-04 20:37:04.713 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.713 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-support-annotations-23.2.0_858aa537f7a6d51e4c718d577a873b96da103588-classes.dex". Will use given name. 
08-04 20:37:04.719 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.719 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-slice_9-classes.dex". Will use given name. 
08-04 20:37:04.726 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.726 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-slice_8-classes.dex". Will use given name. 
08-04 20:37:04.733 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.733 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-slice_7-classes.dex". Will use given name. 
08-04 20:37:04.738 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.738 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-slice_6-classes.dex". Will use given name. 
08-04 20:37:04.745 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.745 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-slice_5-classes.dex". Will use given name. 
08-04 20:37:04.750 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.750 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-slice_4-classes.dex". Will use given name. 
08-04 20:37:04.759 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.759 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-slice_3-classes.dex". Will use given name. 
08-04 20:37:04.765 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.765 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-slice_2-classes.dex". Will use given name. 
08-04 20:37:04.770 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.770 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-slice_1-classes.dex". Will use given name. 
08-04 20:37:04.777 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.777 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-slice_0-classes.dex". Will use given name. 
08-04 20:37:04.781 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.781 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-internal_impl-23.2.0_5e4ee41384105e9948ae506dd5eff2c6aae29ebf-classes.dex". Will use given name. 
08-04 20:37:04.788 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.788 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-com.android.support-support-vector-drawable-23.2.0_158966069f8a3867ecdead9c719a0d5b802abeaf-classes.dex". Will use given name. 
08-04 20:37:04.794 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.794 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-com.android.support-support-v4-23.2.0_ec2c66a9230f7199936cb3abd7be38c355b0bf6c-classes.dex". Will use given name. 
08-04 20:37:04.800 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.800 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-com.android.support-recyclerview-v7-23.2.0_caadf0103029ddc76cc4fb924c8984b1e58eec96-classes.dex". Will use given name. 
08-04 20:37:04.806 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.806 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-com.android.support-design-23.2.0_e944fe6b62fe4c59186245a238c4f80c5d5ce603-classes.dex". Will use given name. 
08-04 20:37:04.811 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.811 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-com.android.support-appcompat-v7-23.2.0_c070370c0648b101163720f82b913cbda75b0577-classes.dex". Will use given name. 
08-04 20:37:04.817 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.817 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-com.android.support-animated-vector-drawable-23.2.0_a003b982988e746a36ca3a40899e647f59b088ab-classes.dex". Will use given name. 
08-04 20:37:04.825 21761-21761/online.tipme.app E/linker: readlink('') failed: No such file or directory [fd=20] 
08-04 20:37:04.825 21761-21761/online.tipme.app E/linker: warning: unable to get realpath for the library "/data/data/online.tipme.app/cache/slice-PayPal_MPL_41e4c9a9596a46d800358a44cf512c7e9452d9ac-classes.dex". Will use given name. 
08-04 20:37:04.830 21761-21761/online.tipme.app W/System: ClassLoader referenced unknown path: /data/app/online.tipme.app-2/lib/arm64 
08-04 20:37:05.311 21761-21776/online.tipme.app I/Adreno: QUALCOMM build     : 02953e5, I64c525f392 
                  Build Date      : 10/14/15 
                  OpenGL ES Shader Compiler Version: XE031.05.13.03 
                  Local Branch      : workspace2 
                  Remote Branch     : 
                  Remote Branch     : 
                  Reconstruct Branch    : 
08-04 20:37:05.315 21761-21776/online.tipme.app I/OpenGLRenderer: Initialized EGL, version 1.4 
08-04 20:37:13.464 21761-21761/online.tipme.app W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 
08-04 20:37:13.464 21761-21761/online.tipme.app W/IInputConnectionWrapper: getSelectedText on inactive InputConnection 
08-04 20:37:13.480 21761-21761/online.tipme.app W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 
08-04 20:37:13.480 21761-21761/online.tipme.app W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 
08-04 20:37:13.497 21761-21761/online.tipme.app W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection 
08-04 20:38:48.757 21761-21761/online.tipme.app W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 
08-04 20:38:48.757 21761-21761/online.tipme.app W/IInputConnectionWrapper: getSelectedText on inactive InputConnection 
08-04 20:38:48.773 21761-21761/online.tipme.app W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 
08-04 20:38:48.773 21761-21761/online.tipme.app W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 
08-04 20:38:48.790 21761-21761/online.tipme.app W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection 
08-04 20:39:16.221 21761-21761/online.tipme.app W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection 
08-04 20:39:16.221 21761-21761/online.tipme.app W/IInputConnectionWrapper: getSelectedText on inactive InputConnection 
08-04 20:39:16.236 21761-21761/online.tipme.app W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection 
08-04 20:39:16.236 21761-21761/online.tipme.app W/IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection 
08-04 20:39:16.252 21761-21761/online.tipme.app W/IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection 

回答

0

我认为你必须使用XML文件,但字符串值进行编辑。

TextView txtView = (TextView) findViewById(R.id."id of string value"); 

在字符串值:

<string name="developer">Developer: GamesExplosion</string> 
+0

我不明白你在说什么。 –