2016-08-04 7 views
0

AndroidスタジオのAndroidアプリで作業していて、xmlファイルを使用してプロジェクトにアニメーションを追加する必要があります。res/animatorディレクトリを作成し、アクティビティ内Android Studioブロックでのアニメーターファイルの作成

<?xml version="1.0" encoding="utf-8"?> 
<set xmlns:android="http://schemas.android.com/apk/res/android"android:ordering="together"> 
</set> 

pulsation.xmlせずにアプリケーションを実行しているSharedPreferences object.Whenに保存されているいくつかの値へのアプリのアクセス:コードここでは、何もしないpulsation.xmlと呼ば res/animatorディレクトリのファイル.xmlを入力すると、プログラムは問題なく必要な値を取得します。ファイル内res/animatorプログラムは何も取得できません。この奇妙な動作の原因はわかりません。ここでアプリがSharedPreferencesからデータを取得するコードの一部オブジェクト:

SharedPreferences pref = getSharedPreferences("ballan.emmanuele.hellpuzzle.PUNTEGGI",MODE_PRIVATE); 
     SharedPreferences.Editor editor = pref.edit(); 
    do 
      { 
next = pref.getInt(R.id.liv1+"next",R.id.liv2); 
       TextView punt = (TextView) findViewById(pref.getInt(next+"punt",R.id.punt1)); 
       punt.setText(pref.getInt(next+"punteggio",0)+""); 
       TextView num = (TextView) findViewById(pref.getInt(next+"num",R.id.num1)); 
       num.setText(pref.getInt(next+"numero_sequenza",0)+""); 
       LinearLayout lay =(LinearLayout)findViewById(pref.getInt(next+"riga",R.id.riga1)); 
       lay.setVisibility(View.VISIBLE); 
      }while (next != ultimo); 

は私が助けるために11.Thanks最小SDKのバージョンを設定します。

+0

あなたは 'res/anim'ディレクトリを意味しますか? – Shaishav

+0

プロパティアニメーションディレクトリの$ res/animatorディレクトリ – Emmanuele

+0

ああ...私の怒って...謝罪! – Shaishav

答えて

0

問題がNexus S Api 23であることが判明しました。このエミュレータを使用すると、プログラムはまだ動作しません。エミュレータを変更したり、Samsungや他のNexusエミュレータの電話を使用してアプリを気にする必要はありません。

関連する問題