use of androidx.drawerlayout.widget.DrawerLayout.LayoutParams in project RxBinding by JakeWharton.
the class RxDrawerLayoutTestActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
drawerLayout = new DrawerLayout(this);
drawerLayout.setId(android.R.id.primary);
FrameLayout main = new FrameLayout(this);
LayoutParams mainParams = new LayoutParams(MATCH_PARENT, MATCH_PARENT);
drawerLayout.addView(main, mainParams);
FrameLayout drawer = new FrameLayout(this);
drawer.setBackgroundColor(Color.WHITE);
LayoutParams drawerParams = new LayoutParams(300, MATCH_PARENT, RIGHT);
drawerLayout.addView(drawer, drawerParams);
setContentView(drawerLayout);
}
Aggregations