0
私はこのライブラリhttps://github.com/roughike/BottomBarを使用してBottomBar を作成していますが、これまでは各タブに特定のレイアウトを追加できませんでした。各タブのレイアウトを与える方法(下のバー)
public class MainActivity extends Activity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
BottomBar bottomBar = (BottomBar) findViewById(R.id.bottomBar);
bottomBar.setOnTabSelectListener(new OnTabSelectListener() {
@Override
public void onTabSelected(@IdRes int tabId) {
if (tabId == R.id.tab_favorites) {
// The tab with id R.id.tab_favorites was selected,
// change your content accordingly.
}
}
});
}
}
私はそれに応じてあなたのコンテンツを変更するとわからない。任意のコードサンプルが役立ちます。