- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我想看到下面的拇指滚动条:
http://www.androidpatterns.com/uap_pattern/scroll-thumb
我看到的是:
我的 XML 布局是:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adSize="SMART_BANNER"
ads:adUnitId="xxaassss"
ads:loadAdOnCreate="true" >
</com.google.ads.AdView>
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="#b5b5b5"
android:dividerHeight="1dp"
android:listSelector="@drawable/list_selector" />
</LinearLayout>
我的 Java 代码 在 Activity 类的 onCreate 中(我从 Activity 类而不是 ListActivity 扩展):
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ListView list=(ListView)findViewById(R.id.list);
ArrayList<HashMap<String, String>> categoriesList = new ArrayList<HashMap<String, String>>();
for(int i=0;i<119;i++) {
HashMap<String, String> map = new HashMap<String, String>();
map.put(KEY_ID, String.valueOf(i));
//map.put(KEY_TITLE, "hello");
map.put(KEY_TITLE, Prayer.tip.getNthLine(i, true).replace("~", ""));
map.put(KEY_ARTIST, "");
map.put(KEY_DURATION, "");
map.put(KEY_THUMB_URL, String.valueOf(getResources().getIdentifier("img" + i, "drawable", getPackageName())));
categoriesList.add(map);
}
LazyAdapter adapter=new LazyAdapter(this, categoriesList);
list.setAdapter(adapter);
list.setFastScrollEnabled(true);
我没有发布 LazyAdapter 的代码,因为我认为它与快速拇指滚动条的样式无关。如果需要,我也可以发布该代码。
最佳答案
像这样更改您的 xml 代码
<com.google.ads.AdView
android:id="@+id/adView"`enter code here`
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adSize="SMART_BANNER"
ads:adUnitId="xxaassss"
ads:loadAdOnCreate="true" >
</com.google.ads.AdView>
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:divider="#FFF"
android:fadeScrollbars="false"
style="@style/CustomTheme"
android:scrollX="0px"
android:scrollY="0px"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbarSize="20dp"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical" />
以你的风格
<style name="CustomTheme" parent="android:Theme">
<item name="android:scrollbarTrackVertical">@drawable/scroll_track</item>
<item name="android:scrollbarThumbVertical">@drawable/scroll_thumb</item>
就像在 list 中
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/CustomTheme">
关于Android ListView thumb ScrollBar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17205017/
我正在尝试学习对固件修改有用的技能(我没有源代码) 这些问题涉及使用 BX 从拇指代码跳转或调用其他现有拇指代码。 我如何使用 BX 从我的 THUMB 代码跳转到现有固件 THUMB 代码。 我如何
我正在研究具有 Thumb-2 指令集的 ARM Cortex-M3 Controller 。 Thumb 模式用于将指令压缩为 16 位大小。 因此减少了代码的大小。但是正常的Thumb模式下,为什
我对指令集有点困惑。有 Thumb、ARM 和 Thumb 2。从我所读到的 Thumb 指令都是 16 位的,但在 内。 ARMv7M 用户手册 (第 vi 页)提到了 Thumb 16 位和 Th
我有一个要求,我需要在其中实现竖起大拇指、不竖起大拇指的类型的切换按钮,我正在努力了解如何实现这一点。我不确定我是否可以创建一种样式,并且这种样式会根据按钮的按下方式改变图像的背景.... 谁能分享一
我正在尝试创建一个带有拇指的搜索栏,当用户按下它时会改变颜色,当用户松开时会变回颜色。我设法使用 set thumb 更改了 thumb drawable。但是,我还必须在 java 中设置可绘制边界
以下是thumb-2指令的w后缀,如果没有它,它将如何改变指令的语义?搜索结果非常嘈杂,我没有得到答案。 addw r0, r1, #0 最佳答案 我在Cortex-M3 TRM表2-5中看到了ADD
为什么 ARM Controller 在发生异常时要从 THUMB 状态返回到 ARM 状态? 最佳答案 一种解释可能是 ARM 模式是 CPU 的“ native ”操作模式,与有限的 Thumb
我正在为需要链接到现有 THUMB 代码的嵌入式内核 (ARM7TDMI) 编写 THUMB 代码。我正在使用 GNU ARM 嵌入式工具链 ( link )。我无法让链接器将现有的外部代码视为 TH
我正在尝试使用 THUMB 指令创建一个阶乘方法,我基本上做到了。 我只有一个关于 PUSH/POP 操作码的问题:如果我使用 push 将 r0 的值存储在堆栈中(所以 push {r0} ),我可
我正在尝试显示位于拇指上方居中的范围项的值。通过读取值并将元素定位在范围元素上方作为其 clientWidth 的百分比,这非常有效。 然而,距离中间的偏移量越来越大(见图片),这导致值不在拇指上居中
我有一个弹出控件,我添加了一个拇指,这样我就可以将它拖动到屏幕上。拇指的 DragDelta 事件已重载: private static void Thumb_DragDelta(object sen
是否有用于 thumb-2 汇编的模拟器之类的东西?我想编写简单的 ARM Thumb-2 汇编程序并在不需要使用实际 ARM 设备的情况下对其进行测试,所以我唯一的选择是仿真。 我的目标是在 thu
我正在尝试在 slider 组件内的 JSlider Thumb 上方添加一个标签(按坐标方向)。因此,我尝试在 slider 的父组件中执行以下操作: this.setLayout(
我运行了一个我发明的 Java 守护程序,它监视我的 Windoze 10 笔记本电脑上的一个目录,并通过打开它来粉碎进入它的所有内容,将其当前大小写入 NULL,保存它,然后删除它。它笨手笨脚,但有
我正在尝试在 Google App Engine 中调整图像大小并裁剪图像以创建缩略图 我希望能够创建任意尺寸的 200x150 拇指。 这是我到目前为止使用的代码,现在我需要对其进行裁剪,使其不大于
我已经制作了我的音乐应用程序,现在我需要在搜索栏上制作音乐播放/暂停控件。这是图片 如您所见,seekbar 带有自定义拇指图像,当用户触摸拇指音乐时,音乐开始播放或停止。是否可以实现类似的功能?基本
我正在开发谷歌浏览器扩展程序。在那里我想获取顶级站点的缓存缩略图。 当我访问像 chrome://thumb/http://www.google.com/ 这样的 url 时,我可以看到缩略图。但在我
我为一些 slider 创建了一个自定义类。在 chrome 中一切正常。请参见下图: Chrome 但我的问题是在 Internet Explorer 上我得到了这个: 现在这是我的 CSS: in
有没有人对 IE11 中输入范围控件上的 ms-thumb 伪元素的样式和控制行为有任何经验? 如果控件比 thumb 伪元素高,则拖动后 thumb 会粘在顶部并且不会返回到它的原始位置。 Here
我正在使用 prettyphoto 并想切换到 fancybox,我的画廊正在使用 isotope 进行滤镜和动画处理,但我认为这不是问题所在。图像出现,但没有拇指!在开发工具中,当选择图片时,有一个
我是一名优秀的程序员,十分优秀!