我尝试通过 OnResume
来模拟点击列表视图的第一项public Task<Metadata> GetMetadataAsync(
string path,
bool includeMediaInfo = false,
bool includeDeleted = false,
bool includeHasExplicitSharedMembers = false,
CancellationToken ct = null /*This is would be optional cancellation token. But this parameter doesn't exist in API*/
);
但是我在空对象引用 上得到错误
listView.getAdapter().getView(0, null, null).performClick();
答案 0 :(得分:0)
试试这个。
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
listView.getAdapter().getView(0, null, null).performClick();
}
}, 1500);