|
|
|
@ -172,17 +172,22 @@ public class NotesListActivity extends AppCompatActivity implements OnClickListe
|
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
|
setContentView(layout.note_list);
|
|
|
|
|
|
|
|
|
|
Drawable drawable= getResources().getDrawable(list_background);
|
|
|
|
|
BitmapDrawable bd = (BitmapDrawable) drawable;
|
|
|
|
|
Bitmap b = bd.getBitmap();
|
|
|
|
|
File path = new File(getCacheDir() + "/SampleCropImage.jpeg");
|
|
|
|
|
try {
|
|
|
|
|
OutputStream os = new FileOutputStream(path);
|
|
|
|
|
b.compress(Bitmap.CompressFormat.JPEG, 100, os);
|
|
|
|
|
os.close();
|
|
|
|
|
} catch (Exception ignored) {
|
|
|
|
|
SharedPreferences sharedPreferences=getSharedPreferences("data1", Context.MODE_WORLD_READABLE);
|
|
|
|
|
if(!sharedPreferences.contains("DEFAULT"))
|
|
|
|
|
{
|
|
|
|
|
Drawable drawable= getResources().getDrawable(list_background);
|
|
|
|
|
BitmapDrawable bd = (BitmapDrawable) drawable;
|
|
|
|
|
Bitmap b = bd.getBitmap();
|
|
|
|
|
File path = new File(getCacheDir() + "/SampleCropImage.jpeg");
|
|
|
|
|
try {
|
|
|
|
|
OutputStream os = new FileOutputStream(path);
|
|
|
|
|
b.compress(Bitmap.CompressFormat.JPEG, 100, os);
|
|
|
|
|
os.close();
|
|
|
|
|
} catch (Exception ignored) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initResources();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|