2017-05-18 15 views
-4

私はSharedPreferenceを使用してURLを格納しています。Android SharedPreference write =値

これらのURLには=が含まれていますが、アンドロイドはまだ新しいキー=値パラメータだと思っています。

+1

ようRetrive URLこの仲間のよう

SharedPreferences prefs = this.getSharedPreferences("Demo", Context.MODE_PRIVATE); SharedPreferences.Editor edit = prefs.edit(); edit.putString("yourKey","http://stackoverflow.com/questions/tagged/android?sort=newest&pageSize=50"); edit.commit(); 

を試してみてください、あなたの試したコード –

+0

を貼り付けてくださいStackOverflowの上で質問をする方法の思考のガイドラインを行ってください。 – chandil03

+0

コードの行を表示する、それは明確ではない、問題は何ですか –

答えて

0

この

SharedPreferences prefs = this.getSharedPreferences("Demo", Context.MODE_PRIVATE); 
SharedPreferences.Editor edit = prefs.edit(); 
prefs.getString("yourKey",""); 
Log.d("URL",""+ prefs.getString("yourKey","")); 
edit.commit(); 
関連する問題