当前位置: 首页>>代码示例>>Java>>正文


Java Espresso.closeSoftKeyboard方法代码示例

本文整理汇总了Java中android.support.test.espresso.Espresso.closeSoftKeyboard方法的典型用法代码示例。如果您正苦于以下问题:Java Espresso.closeSoftKeyboard方法的具体用法?Java Espresso.closeSoftKeyboard怎么用?Java Espresso.closeSoftKeyboard使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.test.espresso.Espresso的用法示例。


在下文中一共展示了Espresso.closeSoftKeyboard方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createAccount_accountAppearsOnList

import android.support.test.espresso.Espresso; //导入方法依赖的package包/类
@Test
public void createAccount_accountAppearsOnList() {
    openCreateAccountActivity();

    // when typed account name
    onView(withId(R.id.account_name_edit_text)).perform(typeText(ACCOUNT_1_NAME));
    Espresso.closeSoftKeyboard();

    // and click save fab
    onView(withId(R.id.save_account_fab)).perform(click());


    // then screen should close
    onView(withId(R.id.account_name_edit_text)).check(doesNotExist());

    // and account name should be visible on list
    // todo add check
}
 
开发者ID:przemyslaw-holownia,项目名称:financial-manager,代码行数:19,代码来源:AccountsActivityTest.java

示例2: performStartAdventure

import android.support.test.espresso.Espresso; //导入方法依赖的package包/类
protected void performStartAdventure() {
    ViewInteraction button = onView(allOf(withText(getString(R.string.create_new_adventure)), isDisplayed()));
    button.perform(click());


    //Clicks over the proper book using the property order of the GamebookEnum
    DataInteraction textView = onData(anything())
            .inAdapterView(allOf(withId(R.id.gamebookListView),
                    childAtPosition(
                            withClassName(is("android.widget.RelativeLayout")),
                            0)))
            .atPosition(getGamebook().getOrder() - 1);
    textView.perform(click());

    button = onView(allOf(withText(getString(R.string.create_new_adventure)), isDisplayed()));
    button.perform(click());

    Espresso.closeSoftKeyboard();
}
 
开发者ID:joaomneto,项目名称:TitanCompanion,代码行数:20,代码来源:TCBaseTest.java

示例3: addImage

import android.support.test.espresso.Espresso; //导入方法依赖的package包/类
@Test
public void addImage() {
    Intent resultData = new Intent();
    Bitmap icon = BitmapFactory.decodeResource(getInstrumentation().getContext().getResources(),
            R.drawable.mock_camera_image);
    resultData.putExtra("data", icon);
    Instrumentation.ActivityResult result =
            new Instrumentation.ActivityResult(Activity.RESULT_OK, resultData);

    intending(not(isInternal())).respondWith(result);

    Espresso.closeSoftKeyboard();

    onView(withId(R.id.imageOpacityOverlay)).perform(click());
    onView(withId(R.id.imageOpacityOverlay)).check(matches(not(isDisplayed())));

    onView(withId(R.id.imageDelete)).perform(click());
    onView(withId(R.id.imageOpacityOverlay)).check(matches(isDisplayed()));
}
 
开发者ID:CMPUT301F17T13,项目名称:cat-is-a-dog,代码行数:20,代码来源:AddHabitEventActivityTest.java


注:本文中的android.support.test.espresso.Espresso.closeSoftKeyboard方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。