任何人都可以指向一個示例或一個用於滑動窗口的lib。我有一個應用程序,並且我想要從顯示信息的屏幕底部向用戶滑動一個窗口。Android向上滑動窗口
我希望窗口只能向上滑動一點以顯示信息。有點像一個用戶的Hnt,可能是屏幕的四分之一。
此窗口可以手動解除或定時器。我正在尋找這樣做xamarin,但一個java的例子也會有所幫助。
任何人都可以指向一個示例或一個用於滑動窗口的lib。我有一個應用程序,並且我想要從顯示信息的屏幕底部向用戶滑動一個窗口。Android向上滑動窗口
我希望窗口只能向上滑動一點以顯示信息。有點像一個用戶的Hnt,可能是屏幕的四分之一。
此窗口可以手動解除或定時器。我正在尋找這樣做xamarin,但一個java的例子也會有所幫助。
您可能需要更改此方法中的某些變量。 我在我的一個應用程序中使用這個。動畫從下到上設置相對佈局
private void animate(){
RelativeLayout rl = (RelativeLayout)findViewById(R.id.yourLayout);
AnimationSet set = new AnimationSet(true);
Animation animation = new TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, 0.85f, Animation.RELATIVE_TO_SELF, 0.0f
);
animation.setDuration(250);
set.addAnimation(animation);
LayoutAnimationController controller = new LayoutAnimationController(set, 0.25f);
rl.setLayoutAnimation(controller);
}
如果我理解正確,您可以使用TranslateAnimation完成此操作。 – Bob
啊,是的,這就是我想要的一個例子,看看我將如何創建窗口並使用TranslateAnimation來顯示它。 – LilMoke
是你想要的嗎? http://stackoverflow.com/questions/14452938/vertical-sliding-menu-in-android –