修了一个bug

pull/4/head
Dingzijian 3 years ago
parent 5f1eb416ab
commit 338ed8affc

@ -172,6 +172,9 @@ public class NotesListActivity extends AppCompatActivity implements OnClickListe
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(layout.note_list); setContentView(layout.note_list);
SharedPreferences sharedPreferences=getSharedPreferences("data1", Context.MODE_WORLD_READABLE);
if(!sharedPreferences.contains("DEFAULT"))
{
Drawable drawable= getResources().getDrawable(list_background); Drawable drawable= getResources().getDrawable(list_background);
BitmapDrawable bd = (BitmapDrawable) drawable; BitmapDrawable bd = (BitmapDrawable) drawable;
Bitmap b = bd.getBitmap(); Bitmap b = bd.getBitmap();
@ -182,6 +185,8 @@ public class NotesListActivity extends AppCompatActivity implements OnClickListe
os.close(); os.close();
} catch (Exception ignored) { } catch (Exception ignored) {
} }
}
initResources(); initResources();

Loading…
Cancel
Save