草庐IT

m_navigations

全部标签

java - 在键盘存在时隐藏 ‘Bottom Navigation Bar’ - Android

我有一个小型演示聊天UI应用程序。此应用程序有一个底部导航栏。我需要在键盘出现时隐藏底部导航栏。HereisanexampleofthechatUI当您单击EditText元素时可以看到,键盘出现但底部导航栏保持可见。我试过thismeasurementmethod等方法,但UI元素闪烁likethis.当键盘可见时,是否有适当的方法隐藏底部导航栏?编辑:在下面的Activity中,您可以看到我在哪里设置键盘监听器以在确定键盘可见时调整UI元素的位置。这是我的Activity代码,使用上面链接中的setKeyboardListener方法并将其设置在onCreateView中:pack

android - React-native android忽略navigator.geolocation.getCurrentPosition

我正在尝试在我的Android设备(PhilipsXenium)上使用navigator.geolocation.getCurrentPosition。它在iphone和genimotion模拟器中完全可以正常工作。navigator.geolocation.getCurrentPosition绝对不返回任何内容-没有错误,没有成功。但是,如果我在智能手机中关闭地理定位服务,它会返回Noavailablelocationprovider。另外,navigator.geolocation.watchPosition工作正常。 最佳答案

android - React-native android忽略navigator.geolocation.getCurrentPosition

我正在尝试在我的Android设备(PhilipsXenium)上使用navigator.geolocation.getCurrentPosition。它在iphone和genimotion模拟器中完全可以正常工作。navigator.geolocation.getCurrentPosition绝对不返回任何内容-没有错误,没有成功。但是,如果我在智能手机中关闭地理定位服务,它会返回Noavailablelocationprovider。另外,navigator.geolocation.watchPosition工作正常。 最佳答案

android - 找不到androidx.navigation :safe-args-gradle-plugin:1. 0.0-alpha01

我想使用导航架构组件。但是我在导入safeargs时遇到了问题同步消息:Couldnotfindandroidx.navigation:safe-args-gradle-plugin:1.0.0-alpha01.Searchedinthefollowinglocations:https://dl.google.com/dl/android/maven2/androidx/navigation/safe-args-gradle-plugin/1.0.0-alpha01/safe-args-gradle-plugin-1.0.0-alpha01.pomhttps://dl.google.c

android - 找不到androidx.navigation :safe-args-gradle-plugin:1. 0.0-alpha01

我想使用导航架构组件。但是我在导入safeargs时遇到了问题同步消息:Couldnotfindandroidx.navigation:safe-args-gradle-plugin:1.0.0-alpha01.Searchedinthefollowinglocations:https://dl.google.com/dl/android/maven2/androidx/navigation/safe-args-gradle-plugin/1.0.0-alpha01/safe-args-gradle-plugin-1.0.0-alpha01.pomhttps://dl.google.c

javascript - navigator.geolocation.getCurrentPosition 在 android google chrome 上不起作用

这段代码:navigator.geolocation.getCurrentPosition(function(position){alert(position.coords.latitude,position.coords.longitude);},function(error){alert(error.message);},{enableHighAccuracy:true,timeout:5000});https://jsfiddle.net/FcRpM/在我的笔记本电脑上的GoogleChrome中工作,但在移动HTConeS上工作(Android4.1,GPS关闭,通过移动网络定

javascript - navigator.geolocation.getCurrentPosition 在 android google chrome 上不起作用

这段代码:navigator.geolocation.getCurrentPosition(function(position){alert(position.coords.latitude,position.coords.longitude);},function(error){alert(error.message);},{enableHighAccuracy:true,timeout:5000});https://jsfiddle.net/FcRpM/在我的笔记本电脑上的GoogleChrome中工作,但在移动HTConeS上工作(Android4.1,GPS关闭,通过移动网络定

android - 为 Android Navigation Drawer 设置拖动边距

我正在我的应用程序中使用新的抽屉导航。很好,只是我还没有找到一种简单的方法来设置抽屉的打开方式。默认行为是从屏幕的左边缘拖动以打开。这很好,除非手机/table上有保护套并且手机边缘无法触摸。我想让用户从屏幕的边缘触摸并拖动到左侧。这很容易与其他抽屉导航库(滑动库)一起设置。不幸的是,我没有看到任何关于Google库的内容。可以使用NavigationLayout的onTouchEvent()方法。当然,你可以监听所有的触摸事件并触发一个openDrawer,但希望有一个简单的方法,代码更少。有什么想法吗? 最佳答案 在这里我通过反

android - 为 Android Navigation Drawer 设置拖动边距

我正在我的应用程序中使用新的抽屉导航。很好,只是我还没有找到一种简单的方法来设置抽屉的打开方式。默认行为是从屏幕的左边缘拖动以打开。这很好,除非手机/table上有保护套并且手机边缘无法触摸。我想让用户从屏幕的边缘触摸并拖动到左侧。这很容易与其他抽屉导航库(滑动库)一起设置。不幸的是,我没有看到任何关于Google库的内容。可以使用NavigationLayout的onTouchEvent()方法。当然,你可以监听所有的触摸事件并触发一个openDrawer,但希望有一个简单的方法,代码更少。有什么想法吗? 最佳答案 在这里我通过反

android - 处理 React Native 中的后退按钮,Android 上的 Navigator

我在Androidreactnative应用程序中有一个Navigator。我正在使用navigator.push()导航到不同的页面。后退按钮会弹出导航器并返回一页似乎很自然,但事实并非如此(它会退出应用程序)。react-nativeNavigator真的不支持后退键吗,需要我自己用BackAndroid插入吗? 最佳答案 除了上面的回答,处理代码应该是这样的varnavigator;React.BackAndroid.addEventListener('hardwareBackPress',()=>{if(navigator&