當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。