だから私はG+やYoutubeのように悪名高いスライドアウトメニューで自分の亀裂を試しています。このため、サイドメニューを開くために使用するActionBarUPボタンを設定しています。ほとんどすべてが正しくレイアウトされていますが、尋ねてもHorizontalScrollViewがスライドしていません。
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<include
android:layout_width="wrap_content"
layout="@layout/side_menu" />
<HorizontalScrollView
android:id="@+id/menu_scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbars="horizontal" >
<include
layout="@layout/main_content" />
</HorizontalScrollView>
</FrameLayout>
private void toggleSideMenu() {
mMenuScrollView.postDelayed(new Runnable() {
@Override
public void run() {
int menuWidth = mSideMenu.getMeasuredWidth();
if (!mIsMenuVisible) {
// Scroll to 0 to reveal menu
int left = 0;
mScrollView.smoothScrollTo(left, 0);
} else {
// Scroll to menuWidth so menu isn't on screen.
int left = menuWidth;
mScrollView.smoothScrollTo(left, 0);
}
mIsMenuVisible = !mIsMenuVisible;
}
}, 50);
}
私のsmoothScrollの呼び出しが機能していないようです。