草庐IT

Non-Scrolling

全部标签

android - 设置安卓 :windowBackground to @null makes scrolling to smear?

我正在使用sherlockactionbar库来支持多种设备。我有一个viewPager,它有3个fragment:有一个listView,每个项目都有一个textView和一个imageView第二个有一个gridView,每个项目都有一个textView和一个imageView第三个现在只有一个textView。正如我在googleIO视频中听到的(自从Lint告诉我),建议将下一个样式用于所有Activity:@null这对我来说在很多设备上都有效。但是,在模拟器上,使用版本2.3.3,在galaxynexus上,当我滚动(viewPager或任何adapterViews)时,一

android - 错误 : "Cannot make a static reference to the non-static method findViewById(int) from the type Activity"

我是Java的新手,正在尝试使用EditText创建一个Activity。创建时,它加载当前日期,当用户选择EditText时,它显示一个DatePicker。用户选择日期后,我需要将结果放入EditText。但是,我目前收到以下错误:Cannotmakeastaticreferencetothenon-staticmethodfindViewById(int)fromthetypeActivity我知道我不能对非静态方法进行静态引用。我试图删除所有静态引用,但这给了我其他错误。我的代码如下。您能帮我提供一些示例代码,说明我如何才能完成这项工作吗?错误出在我尝试将结果放入EditTex

安卓 : How to avoid header from scrolling in listview , 安卓?

我有一个ListView,我在其中将标题View添加到该列表。一切都很好,但是当滚动列表headerview也随着列表移动时,所以我想避免headerview滚动,我的意思是当我列表到达顶View(标题栏)时我必须只滚动列表,headerview必须保持在标题栏的底部。有人可以为此提供解决方案吗? 最佳答案 使用以下布局代替标题:-->Yourheaderlayouthere需要注意的重要事项:ListView的id必须是@android:id/list才能使用ListActivity使用0高度并将权重设置为1

安卓开发 : Improve EditText Scrolling?

有什么方法可以增加我的EditText的滚动吗?我想让它像在Web浏览器上那样滚动,流畅且快速。这可能吗?谢谢,亚历克斯。 最佳答案 Webview使用平滑滚动。ScrollView也有这个属性。在ScrollView中添加TextView。为ScrollView创建一个ID并在您的代码中创建引用。将EditText放置在此ScrollView中(使editText包装内容)。使用以下方法启用平滑滚动,publicvoidsetSmoothScrollingEnabled(booleansmoothScrollingEnabled)

android - Gradle 不会将 gdbserver 打包成 apk。 ndk-gdb 结果为 "ERROR: Non-debuggable application installed on the target device"

在AndroidStudio0.6中,我创建了一个android测试项目,其中包含一个用JNI封装的非常简单的C函数。我在AndroidManifest.xml中设置了android:debuggable="true"。我运行了ndk-buildNDK_DEBUG=1。这会在正确的位置生成一个gdbserver和一个gdb.setup文件。但是,当我在AndroidStudio中构建项目并运行ndk-gdb--debug时,我得到了以下输出:AndroidNDKinstallationpath:/usr/local/android-ndk-r9dUsingdefaultadbcomma

安卓工作室 : Unexpected top level exception (finished with non-zero exit value 2. 。)

当我尝试调试我的Android应用程序时,我收到以下错误消息:Error:Executionfailedfortask':app:transformClassesWithDexForDebug'.com.android.build.transform.api.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process'command'/Library/Java/JavaVirtualMachines/jdk1.8.

android - 如何在不出现 "cannot make a static reference to the non static method"编译器错误的情况下使用 runOnUiThread

我有一个主类;ClientPlayerextendsActivity{和服务LotteryServerextendsServiceimplementsRunnable{尝试在此服务的运行方法中使用RunOnUiThread时出现编译器错误,“无法对非静态方法进行静态引用”如何解决这个问题?这里显示了我如何使用代码;@Overridepublicvoidrun(){//ItriedbothClientPlayer.runOnUiThreadandLotteryServer.runOnUiThread//bothdon'tworkClientPlayer.runOnUiThread(new

dart - PageView : Disable the default scrolling and replace it with Tap event

如果我有PageView,如何禁用默认滚动行为(滑动)并通过点击按钮将下一个项目滚动到View中? 最佳答案 要禁用滑动,您可以设置:PageView(physics:NeverScrollableScrollPhysics()) 关于dart-PageView:DisablethedefaultscrollingandreplaceitwithTapevent,我们在StackOverflow上找到一个类似的问题: https://stackoverflow

dart - PageView : Disable the default scrolling and replace it with Tap event

如果我有PageView,如何禁用默认滚动行为(滑动)并通过点击按钮将下一个项目滚动到View中? 最佳答案 要禁用滑动,您可以设置:PageView(physics:NeverScrollableScrollPhysics()) 关于dart-PageView:DisablethedefaultscrollingandreplaceitwithTapevent,我们在StackOverflow上找到一个类似的问题: https://stackoverflow

android - "You need to add at least 2 non-Android TV screenshots"

在我的GooglePlay开发者控制台中,我将两个PNG以2:1的比例(1000pxx500px)拖到电视的图形资源插槽中,它们被接受了。但是当我点击发布应用程序时,我仍然收到消息“您需要添加至少2个非AndroidTV屏幕截图”。所以它仍然处于草稿模式。我不确定我应该做些什么来完成它:我注销然后重新登录,但问题仍然存在。我使用的是Chrome浏览器。我在Firefox浏览器中尝试过。如果重要的话,此应用程序已在Alpha测试中上传。另外,我认为电View像是可选的。 最佳答案 您还需要提供至少两个手机或平板电脑屏幕。