-
Notifications
You must be signed in to change notification settings - Fork 485
Open
Description
How to test bug: add next code in onCreate, run app, choose some transformation and wait for 6 seconds, it will change something but slider won't appear or animation would be frozen (paused at its start)
// test bug
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
mPager.setCurrentItem(4, false);
}
}, 6000);
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
int selectedPage = 0;
if (savedInstanceState != null) {
mSelectedItem = savedInstanceState.getInt(KEY_SELECTED_CLASS);
selectedPage = savedInstanceState.getInt(KEY_SELECTED_PAGE);
}
final ArrayAdapter<TransformerItem> actionBarAdapter = new ArrayAdapter<>(
getApplicationContext(), android.R.layout.simple_list_item_1, android.R.id.text1, TRANSFORM_CLASSES);
setContentView(R.layout.activity_main);
mAdapter = new PageAdapter(getFragmentManager());
mPager = (ViewPager) findViewById(R.id.container);
mPager.setAdapter(mAdapter);
mPager.setCurrentItem(selectedPage);
// test bug
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
mPager.setCurrentItem(4, false);
}
}, 6000);
final ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setListNavigationCallbacks(actionBarAdapter, this);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
//noinspection ResourceType
actionBar.setDisplayOptions(actionBar.getDisplayOptions() ^ ActionBar.DISPLAY_SHOW_TITLE);
actionBar.setSelectedNavigationItem(mSelectedItem);
}
}
for example with ZoomOutSliderTransformer slider won't be fully 100% taking all space of layout (you can see white paddings or margin at right and bottom)
Metadata
Metadata
Assignees
Labels
No labels