4
LinearLayout standardtoolbar = new LinearLayout(context);
standardtoolbar.setMinimumWidth(10);
standardtoolbar.setMinimumHeight(50);
Bitmap toolbarBackgroundImage = SkinManager.getInstance().getImageBitmap("BarBackground");
Drawable d = new BitmapDrawable(toolbarBackgroundImage);
standardtoolbar.setBackgroundDrawable(d);
RelativeLayout.LayoutParams lpstandardtool = new RelativeLayout.LayoutParams(5, LayoutParams.WRAP_CONTENT);
lpstandardtool.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
toolbarLayout.addView(standardtoolbar, 0);
/*toolbarLayout.getScrollX();
toolbarLayout.scrollBy(5, 0);
toolbarLayout.setScrollBarStyle(0);
*/
ScrollView scroll = new ScrollView(AppController.getInstance().getCurrentActivity());
scroll.addView(toolbarLayout);
해당 레이아웃에 대해 스크롤보기가 작동하지 않습니다. 주석 처리 된 코드는 가로 스크롤보기 용으로 작성되었습니다. 그러나 그것은 작동하지 않습니다.안드로이드에서 툴바에 대한 수평 스크롤을 구현하는 방법은 무엇입니까?
XML 파일에서
toolbarLayout..setOrientation (LinearLayout.HORIZONTAL)에서
; – Aerrow