任何人都可以指向一个示例或一个用于滑动窗口的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 –