getMainActivtyActionBar -> getSupportActionBar
This commit is contained in:
parent
99800d9873
commit
77f7826932
|
@ -137,7 +137,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getActionbarTitle() {
|
private String getActionbarTitle() {
|
||||||
return ((MainActivity)solo.getCurrentActivity()).getMainActivtyActionBar().getTitle().toString();
|
return ((MainActivity)solo.getCurrentActivity()).getSupportActionBar().getTitle().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@FlakyTest(tolerance = 3)
|
@FlakyTest(tolerance = 3)
|
||||||
|
|
|
@ -15,7 +15,6 @@ import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
import android.support.v4.app.FragmentTransaction;
|
||||||
import android.support.v4.widget.DrawerLayout;
|
import android.support.v4.widget.DrawerLayout;
|
||||||
import android.support.v7.app.ActionBar;
|
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.ActionBarActivity;
|
||||||
import android.support.v7.app.ActionBarDrawerToggle;
|
import android.support.v7.app.ActionBarDrawerToggle;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
@ -252,10 +251,6 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionBar getMainActivtyActionBar() {
|
|
||||||
return getSupportActionBar();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isDrawerOpen() {
|
public boolean isDrawerOpen() {
|
||||||
return drawerLayout != null && navDrawer != null && drawerLayout.isDrawerOpen(navDrawer);
|
return drawerLayout != null && navDrawer != null && drawerLayout.isDrawerOpen(navDrawer);
|
||||||
}
|
}
|
||||||
|
@ -363,10 +358,6 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
|
||||||
getSupportFragmentManager().popBackStack();
|
getSupportFragmentManager().popBackStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Toolbar getToolbar() {
|
|
||||||
return toolbar;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getSelectedNavListIndex() {
|
private int getSelectedNavListIndex() {
|
||||||
String currentFragment = getLastNavFragment();
|
String currentFragment = getLastNavFragment();
|
||||||
if(currentFragment == null) {
|
if(currentFragment == null) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class AddFeedFragment extends Fragment {
|
||||||
Button butSearchITunes = (Button) root.findViewById(R.id.butSearchItunes);
|
Button butSearchITunes = (Button) root.findViewById(R.id.butSearchItunes);
|
||||||
|
|
||||||
final MainActivity activity = (MainActivity) getActivity();
|
final MainActivity activity = (MainActivity) getActivity();
|
||||||
activity.getMainActivtyActionBar().setTitle(R.string.add_feed_label);
|
activity.getSupportActionBar().setTitle(R.string.add_feed_label);
|
||||||
|
|
||||||
butSearchITunes.setOnClickListener(new View.OnClickListener() {
|
butSearchITunes.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class TagFragment extends PodcastListFragment {
|
||||||
@Override
|
@Override
|
||||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
((MainActivity) getActivity()).getMainActivtyActionBar().setTitle(tag.getTitle());
|
((MainActivity) getActivity()).getSupportActionBar().setTitle(tag.getTitle());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class TagListFragment extends ListFragment {
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
((MainActivity) getActivity()).getMainActivtyActionBar().setTitle(R.string.add_feed_label);
|
((MainActivity) getActivity()).getSupportActionBar().setTitle(R.string.add_feed_label);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue