本文整理了Java中android.widget.TextView.performClick()
方法的一些代码示例,展示了TextView.performClick()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.performClick()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:performClick
暂无
代码示例来源:origin: wangdan/AisenWeiBo
@Override
public void onDateSet(DatePickerDialog datePickerDialog, int year, int month, int day) {
Logger.v(TAG, String.format("onDateSet:yeat=%d, month = %d, day = %d", year, month, day));
if (checkTiming(year, month, day, calendar.get(Calendar.HOUR_OF_DAY), calendar.get(Calendar.MINUTE))) {
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.MONTH, month);
calendar.set(Calendar.DAY_OF_MONTH, day);
Calendar c = Calendar.getInstance();
if (month == c.get(Calendar.MONTH) && day == c.get(Calendar.DAY_OF_MONTH)) {
btnDate.setText(R.string.publish_today);
}
else {
btnDate.setText(DateUtils.formatDate(calendar.getTimeInMillis(), getString(R.string.publish_date_format_md)));
}
btnTime.performClick();
}
}
};
代码示例来源:origin: hidroh/materialistic
@Config(sdk = 21)
@Test
public void testRemoveAccount() {
AccountManager.get(activity).addAccountExplicitly(new Account("existing",
BuildConfig.APPLICATION_ID), "password", null);
Preferences.setUsername(activity, "existing");
drawerAccount.performClick();
AlertDialog alertDialog = ShadowAlertDialog.getLatestAlertDialog();
assertNotNull(alertDialog);
assertThat(alertDialog.getListView().getAdapter()).hasCount(1);
alertDialog.getButton(DialogInterface.BUTTON_NEUTRAL).performClick();
assertThat(alertDialog).isNotShowing();
assertThat(AccountManager.get(activity).getAccounts()).isEmpty();
}
代码示例来源:origin: hidroh/materialistic
@Test
public void testExistingAccount() {
AccountManager.get(activity).addAccountExplicitly(new Account("existing",
BuildConfig.APPLICATION_ID), "password", null);
drawerAccount.performClick();
AlertDialog alertDialog = ShadowAlertDialog.getLatestAlertDialog();
assertNotNull(alertDialog);
assertThat(alertDialog.getListView().getAdapter()).hasCount(1);
shadowOf(alertDialog).clickOnItem(0);
alertDialog.getButton(DialogInterface.BUTTON_POSITIVE).performClick();
assertThat(alertDialog).isNotShowing();
assertThat(drawerAccount).hasText("existing");
assertThat(drawerLogout).isVisible();
drawerAccount.performClick();
alertDialog = ShadowAlertDialog.getLatestAlertDialog();
assertThat(alertDialog.getListView().getAdapter()).hasCount(1);
}
代码示例来源:origin: hidroh/materialistic
@Test
public void testAddAccount() {
AccountManager.get(activity).addAccountExplicitly(new Account("existing",
BuildConfig.APPLICATION_ID), "password", null);
drawerAccount.performClick();
AlertDialog alertDialog = ShadowAlertDialog.getLatestAlertDialog();
assertNotNull(alertDialog);
assertThat(alertDialog.getListView().getAdapter()).hasCount(1);
alertDialog.getButton(DialogInterface.BUTTON_NEGATIVE).performClick();
assertThat(alertDialog).isNotShowing();
((ShadowSupportDrawerLayout) Shadow.extract(activity.findViewById(R.id.drawer_layout)))
.getDrawerListeners().get(0)
.onDrawerClosed(activity.findViewById(R.id.drawer));
assertThat(shadowOf(activity).getNextStartedActivity())
.hasComponent(activity, LoginActivity.class);
}
代码示例来源:origin: wooplr/Spotlight
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if(spotLight.isShown()){
spotLight.removeSpotlightView(false);//Remove current spotlight view from parent
resetAndPlay.performClick();//Show it again in new orientation if required.
}
}
}
代码示例来源:origin: bifan-wei/HwTxtReader
@Override
public boolean onCenterClick(float widthPercentInView) {
mSettingText.performClick();
return true;
}
代码示例来源:origin: by-syk/NetUpDown
@Override
public void onTripleTap() {
tvOptionClose.performClick();
}
代码示例来源:origin: wuyr/CatchPiggy
public void setCurrentLevel(int currentLevel) {
mCurrentLevel = currentLevel;
if (mCurrentLevel > LevelUtil.CLASSIC_MODE_MAX_LEVEL) {
mCurrentLevel = -1;
}
mRefreshButton.performClick();
}
代码示例来源:origin: mabeijianxi/ViewLargerImageUtil
@Override
public void performClickAfterAnimation() {
super.performClick();
}
代码示例来源:origin: bifan-wei/HwTxtReader
@Override
public boolean onOutSideCenterClick(float widthPercentInView) {
if (mBottomMenu.getVisibility() == View.VISIBLE) {
mSettingText.performClick();
return true;
}
return false;
}
});
代码示例来源:origin: stackoverflow.com
TextView tv = (TextView) findViewById( R.id.myTextView );
tv.setOnClickListener( new MyOnClickListener() );
tv.performClick();
代码示例来源:origin: stackoverflow.com
@Override
public boolean onChildClick(ExpandableListView parent,
View v, int groupPosition, int childPosition,
long id) {
final int grp = groupPosition;
final int chdp = childPosition;
TextView txt = (TextView) v.findViewWithTag("title");
txt.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
child = myFolderlist.getArray().get(grp)
.get(chdp);
goToItem(child, none, all, false);
}
});
txt.performClick();
}
代码示例来源:origin: alirezaafkar/SunDatePicker
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (mDateItem.shouldShowYearFirst()) {
mYear.performClick();
} else {
mDate.performClick();
}
}
代码示例来源:origin: searchy2/CustomAlertViewDialogue
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE)) {
if (builder.getPositiveText() != null)
{
Log.d("Input", "Submit");
positiveText.performClick();
}
}
return false;
}
});
代码示例来源:origin: stackoverflow.com
headerText.performClick();
代码示例来源:origin: veryyoung/DingDingLuckyMoney
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
if (PreferencesUtils.quickOpen()) {
TextView imageButton = (TextView) getObjectField(param.thisObject, "k");
if (imageButton.isClickable()) {
imageButton.performClick();
}
}
}
});
代码示例来源:origin: wuyr/CatchPiggy
mRefreshButton.performClick();
} else {
showHeartIsEmptyDialog();
mRefreshButton.performClick();
} else {
showHeartIsEmptyDialog();
mGameResultDialog.dismiss();
if (checkHeartIsEnough(false)) {
mRefreshButton.performClick();
} else {
showHeartIsEmptyDialog();
代码示例来源:origin: zjns/PureNeteaseCloudMusic-Xposed
View parent = (View) textView.getParent();
if (parent != null && parent.getClass() == LinearLayout.class) {
textView.performClick();
内容来源于网络,如有侵权,请联系作者删除!