小编Joe*_*Zee的帖子

单击Espresso中ListView的特定子项

使用Espresso,我希望能够单击ExpandableListView(名为CustomExpandableView)的特定子项.listview创建一组RelativeLayouts(名为MyContainer).

理想情况下,我想在CustomExpandableView中单击特定的MyContainer.但是,我可以忍受只需点击第一个.

MyContainer对象没有我可以引用的唯一ID,但是他们的孩子会这样做,例如 - "text = Sample Text Here 1"

我尝试了一些使用onData传递类类型并尝试让孩子处于特定位置的不同变体,但它只是不起作用.并且,我想避免获取对象并迭代它直到找到合适的孩子.

以下是视图层次结构的一部分供参考(我从层次结构中删除了非重要信息):

+----->CustomExpandableView{} 
|
+------>LinearLayout{}
|
+------->TextView{}
|
+------->FrameLayout{}
|
+-------->BreadCrumbView{}
|
+--------->ImageButton{}
|
+--------->TextView{}
|
+------>LinearLayout{}
|
+------->MyContainer{}
|
+-------->ImageView{res-name=thumb, }
|
+-------->ImageView{res-name=divider}
|
+-------->TextView{res-name=label, text=Sample Text Here 1, input-type=0, ime-target=false}
|
+------->MyContainer{}
|
+-------->ImageView{res-name=thumb}
|
+-------->ImageView{res-name=divider}
|
+-------->TextView{res-name=label text=Sample Text Here 2, input-type=0, ime-target=false}
|

android-espresso

6
推荐指数
1
解决办法
6103
查看次数

如何将rtsp数据提取到MediaCodec中

我在使用MediaPlayer播放RTSP流时遇到问题,因此我决定使用较低级别的API - MediaExtractor和MediaCodec.

问题是MediaExtractor的setDataSource()方法不接受RTSP流.

所以,我的问题是,如何将rtsp数据导入MediaCodec输入缓冲区?

java android rtsp mediacodec mediaextractor

5
推荐指数
0
解决办法
549
查看次数