Create text for empty listView

RelativeLayout lContainerLayout = new RelativeLayout(this); lContainerLayout.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT)); TextView textView = new TextView(this); textView.setText("List is empty!"); RelativeLayout.LayoutParams lButtonParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); lButtonParams.addRule(RelativeLayout.CENTER_IN_PARENT); textView.setLayoutParams(lButtonParams); lContainerLayout.addView(textView); addContentView(lContainerLayout, new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT)); listView.setEmptyView(lContainerLayout);

Pretty way for serialization files

Found here: http://stackoverflow.com/a/4118917/619673 Saving (w/o exception handling code): FileOutputStream fos = context.openFileOutput(fileName, Context.MODE_PRIVATE); ObjectOutputStream os = new ObjectOutputStream(fos); os.writeObject(this); os.close(); fos.close(); Loading (w/o exception handling code): FileInputStream fis = context.openFileInput(fileName);…