Fixes
This commit is contained in:
parent
3f16b4e8a2
commit
3bf2b109bb
|
@ -32,6 +32,8 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
|
|||
private Solo solo;
|
||||
private UITestUtils uiTestUtils;
|
||||
|
||||
private SharedPreferences prefs;
|
||||
|
||||
public MainActivityTest() {
|
||||
super(MainActivity.class);
|
||||
}
|
||||
|
@ -48,7 +50,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
|
|||
adapter.close();
|
||||
|
||||
// override first launch preference
|
||||
SharedPreferences prefs = getInstrumentation().getTargetContext().getSharedPreferences(MainActivity.PREF_NAME, Context.MODE_PRIVATE);
|
||||
prefs = getInstrumentation().getTargetContext().getSharedPreferences(MainActivity.PREF_NAME, Context.MODE_PRIVATE);
|
||||
prefs.edit().putBoolean(MainActivity.PREF_IS_FIRST_LAUNCH, false).commit();
|
||||
}
|
||||
|
||||
|
@ -56,7 +58,12 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
|
|||
protected void tearDown() throws Exception {
|
||||
uiTestUtils.tearDown();
|
||||
solo.finishOpenedActivities();
|
||||
|
||||
PodDBAdapter.deleteDatabase(getInstrumentation().getTargetContext());
|
||||
|
||||
// reset preferences
|
||||
prefs.edit().clear().commit();
|
||||
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
|
|
|
@ -413,6 +413,7 @@ public class AudioplayerActivity extends MediaplayerActivity implements ItemDesc
|
|||
butShowCover = (ImageButton) findViewById(R.id.butCover);
|
||||
txtvTitle = (TextView) findViewById(R.id.txtvTitle);
|
||||
|
||||
/*
|
||||
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.drawer_open, R.string.drawer_close) {
|
||||
CharSequence currentTitle = getSupportActionBar().getTitle();
|
||||
|
||||
|
@ -430,7 +431,7 @@ public class AudioplayerActivity extends MediaplayerActivity implements ItemDesc
|
|||
getSupportActionBar().setTitle(currentTitle);
|
||||
supportInvalidateOptionsMenu();
|
||||
}
|
||||
};
|
||||
}; */
|
||||
|
||||
drawerToggle.setDrawerIndicatorEnabled(false);
|
||||
drawerLayout.setDrawerListener(drawerToggle);
|
||||
|
|
|
@ -112,21 +112,21 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
|
|||
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||
navList = (ListView) findViewById(R.id.nav_list);
|
||||
navDrawer = findViewById(R.id.nav_layout);
|
||||
|
||||
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.drawer_open, R.string.drawer_close) {
|
||||
@Override
|
||||
public void onDrawerOpened(View drawerView) {
|
||||
super.onDrawerOpened(drawerView);
|
||||
currentTitle = getSupportActionBar().getTitle();
|
||||
getSupportActionBar().setTitle(drawerTitle);
|
||||
supportInvalidateOptionsMenu();
|
||||
//currentTitle = getSupportActionBar().getTitle();
|
||||
//getSupportActionBar().setTitle(drawerTitle);
|
||||
//supportInvalidateOptionsMenu();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDrawerClosed(View drawerView) {
|
||||
super.onDrawerClosed(drawerView);
|
||||
getSupportActionBar().setTitle(currentTitle);
|
||||
supportInvalidateOptionsMenu();
|
||||
|
||||
//getSupportActionBar().setTitle(currentTitle);
|
||||
//supportInvalidateOptionsMenu();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -481,7 +481,8 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (drawerToggle.onOptionsItemSelected(item)) {
|
||||
return true;
|
||||
} else if (item.getItemId() == android.R.id.home) {
|
||||
} else
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
|
||||
dismissChildFragment();
|
||||
}
|
||||
|
|
|
@ -431,10 +431,14 @@ public abstract class MediaplayerActivity extends ActionBarActivity
|
|||
butPlay = (ImageButton) findViewById(R.id.butPlay);
|
||||
butRev = (ImageButton) findViewById(R.id.butRev);
|
||||
txtvRev = (TextView) findViewById(R.id.txtvRev);
|
||||
txtvRev.setText(String.valueOf(UserPreferences.getRewindSecs()));
|
||||
if(txtvRev != null) {
|
||||
txtvRev.setText(String.valueOf(UserPreferences.getRewindSecs()));
|
||||
}
|
||||
butFF = (ImageButton) findViewById(R.id.butFF);
|
||||
txtvFF = (TextView) findViewById(R.id.txtvFF);
|
||||
txtvFF.setText(String.valueOf(UserPreferences.getFastFowardSecs()));
|
||||
if(txtvFF != null) {
|
||||
txtvFF.setText(String.valueOf(UserPreferences.getFastFowardSecs()));
|
||||
}
|
||||
|
||||
// SEEKBAR SETUP
|
||||
|
||||
|
|
Loading…
Reference in New Issue