Rearrange
This commit is contained in:
parent
e8df341197
commit
d525b27d44
1 changed files with 26 additions and 26 deletions
|
@ -14,16 +14,6 @@ public class AddDVDActivity extends Activity
|
|||
{
|
||||
private DVDDataSource datasource;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.add);
|
||||
|
||||
datasource = new DVDDataSource(this);
|
||||
datasource.open();
|
||||
}
|
||||
|
||||
public void createDVD()
|
||||
{
|
||||
EditText name_entry = (EditText)findViewById(R.id.name_entry);
|
||||
|
@ -38,24 +28,13 @@ public class AddDVDActivity extends Activity
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void onResume()
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.add);
|
||||
|
||||
datasource = new DVDDataSource(this);
|
||||
datasource.open();
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause()
|
||||
{
|
||||
datasource.close();
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy()
|
||||
{
|
||||
datasource.close();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -66,6 +45,13 @@ public class AddDVDActivity extends Activity
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy()
|
||||
{
|
||||
datasource.close();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item)
|
||||
{
|
||||
|
@ -78,4 +64,18 @@ public class AddDVDActivity extends Activity
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause()
|
||||
{
|
||||
datasource.close();
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume()
|
||||
{
|
||||
datasource.open();
|
||||
super.onResume();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue