Allow plugins to add panes to mobile nav drawer
This commit is contained in:
@ -168,4 +168,14 @@ public class IITC_JSInterface {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void addPane(final String name, final String label, final String icon) {
|
||||
mIitc.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mIitc.getNavigationHelper().addPane(name, label, icon);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -168,6 +168,11 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt
|
||||
}
|
||||
}
|
||||
|
||||
public void addPane(String name, String label, String icon) {
|
||||
// TODO handle icon
|
||||
mNavigationAdapter.add(new Pane(name, label, 0));
|
||||
}
|
||||
|
||||
public void closeDrawers() {
|
||||
mDrawerLayout.closeDrawers();
|
||||
}
|
||||
|
Reference in New Issue
Block a user