[英]How do I implement such layout?
I'm looking for this widget name so I can look for existing implementations. 我正在寻找此小部件名称,以便可以寻找现有的实现。 I saw it in app written with PhoneGap .
我在用PhoneGap编写的应用程序中看到了它。 The behaviour: you click on the view part and then it slides and shows itself.
行为:单击视图部分,然后滑动并显示自己。
You are probably talking about the SlidingDrawer widget. 您可能正在谈论SlidingDrawer小部件。 Not sure if that is what you want.
不知道那是不是你想要的。 Anyway you can check the doc here SlidingDrawer
反正你可以在这里查看DOC SlidingDrawer
You'll most likely want to use a SlidingDrawer
. 您很可能想使用
SlidingDrawer
。 I have implemented this exact type of layout using a view extending SlidingDrawer
for further customizations. 我已经使用视图扩展
SlidingDrawer
进行了进一步的自定义, SlidingDrawer
实现了这种确切的布局类型。
What you need to do is add a SlidingDrawer
to perhaps a FrameLayout
. 您需要做的是将
SlidingDrawer
添加到FrameLayout
。 This FrameLayout
should have a static height(say 200dp
) for the SlidingDrawer
to live in. Place the FrameLayout
at the bottom of the layout using perhaps a RelativeLayout
. 该
FrameLayout
应该具有一个静态高度(例如200dp
),以SlidingDrawer
居住。可以使用RelativeLayout
将FrameLayout
放置在布局的底部。
You may find that the SlidingDrawer
behaves not to your expectations in some cases(adding more complex objects which respond to user interactions to the handle
of the SlidingDrawer
can produce problems) 您可能会发现,在某些情况下,
SlidingDrawer
行为不符合您的期望(将更复杂的对象(响应用户交互的行为添加到SlidingDrawer
的handle
中会产生问题))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.