从底部到顶部滑动屏幕时如何打开我的Android应用程序 [英] How do I open my android application when sliding screen from bottom to top

查看:129
本文介绍了从底部到顶部滑动屏幕时如何打开我的Android应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在为视障人士制作聊天应用程序,所以我想让他们轻松查找应用程序并打开它。



我正在考虑从底部到顶部滑动手机屏幕以打开应用程序。任何人都可以为我提供一个代码来执行此操作吗?

Hello,

I'm working on a chatting application for visually impaired people and so I want to make it easy for them to look up the application and open it.

I'm thinking about sliding my phone's screen from bottom to top to open the application. Can any one provide me a code to do this ?

推荐答案

据我所知,当您滑开设备时无法打开您的应用程序,但您可以使用如果你愿意,可以在你的应用程序中使用滑动功能。



视图的名称(Android代表UI小部件)是 SlidingDrawer 。 br />


您可以通过向 DrawerOpen DrawerClose 事件添加代码来使用View。



To my knowledge you can't open your app when you slide open your device, but you can use the sliding feature in your app if you want.

The name of the View (Android speak for a UI widget) is a SlidingDrawer.

You use the View by adding code to the DrawerOpen and DrawerClose events.

private SlidingDrawer _slidingDrawer;
 _slidingDrawer = Activity.FindViewById<SlidingDrawer>(Resource.Id.SlidingDrawer);


_slidingDrawer.DrawerOpen += (o, e) => { //add your code here}
_slidingDrawer.DrawerClose += (o, e) => { //add your code here}





更多信息可以在这里找到 http://developer.android.com/reference/android/widget/SlidingDrawer.html [ ^ ]


这篇关于从底部到顶部滑动屏幕时如何打开我的Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆