當前位置: 首頁>>代碼示例>>Java>>正文


Java SlidingPaneLayout.closePane方法代碼示例

本文整理匯總了Java中android.support.v4.widget.SlidingPaneLayout.closePane方法的典型用法代碼示例。如果您正苦於以下問題:Java SlidingPaneLayout.closePane方法的具體用法?Java SlidingPaneLayout.closePane怎麽用?Java SlidingPaneLayout.closePane使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.support.v4.widget.SlidingPaneLayout的用法示例。


在下文中一共展示了SlidingPaneLayout.closePane方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: hideConversationsOverview

import android.support.v4.widget.SlidingPaneLayout; //導入方法依賴的package包/類
public void hideConversationsOverview() {
	if (mContentView instanceof SlidingPaneLayout) {
		SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
		mShouldPanelBeOpen.set(false);
		mSlidingPaneLayout.closePane();
	}
}
 
開發者ID:syntafin,項目名稱:TenguChat,代碼行數:8,代碼來源:ConversationActivity.java

示例2: hideConversationsOverview

import android.support.v4.widget.SlidingPaneLayout; //導入方法依賴的package包/類
public void hideConversationsOverview() {
    if (mContentView instanceof SlidingPaneLayout) {
        SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
        mShouldPanelBeOpen.set(false);
        mSlidingPaneLayout.closePane();
    }
}
 
開發者ID:kriztan,項目名稱:Pix-Art-Messenger,代碼行數:8,代碼來源:ConversationActivity.java

示例3: open

import android.support.v4.widget.SlidingPaneLayout; //導入方法依賴的package包/類
/**
 * An action which sets whether the pane of {@code view} is open.
 * <p>
 * <em>Warning:</em> The created observable keeps a strong reference to {@code view}. Unsubscribe
 * to free this reference.
 */
@CheckResult @NonNull public static Consumer<? super Boolean> open(
    @NonNull final SlidingPaneLayout view) {
  checkNotNull(view, "view == null");
  return new Consumer<Boolean>() {
    @Override public void accept(Boolean value) {
      if (value) {
        view.openPane();
      } else {
        view.closePane();
      }
    }
  };
}
 
開發者ID:JakeWharton,項目名稱:RxBinding,代碼行數:20,代碼來源:RxSlidingPaneLayout.java

示例4: hideConversationsOverview

import android.support.v4.widget.SlidingPaneLayout; //導入方法依賴的package包/類
public void hideConversationsOverview() {
	if (mContentView instanceof SlidingPaneLayout) {
		SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
		mSlidingPaneLayout.closePane();
	}
}
 
開發者ID:xavierle,項目名稱:messengerxmpp,代碼行數:7,代碼來源:ConversationActivity.java

示例5: onCreate

import android.support.v4.widget.SlidingPaneLayout; //導入方法依賴的package包/類
@Override protected void onCreate(Bundle state) {
    super.onCreate(state);

    setContentView(R.layout.activity_settings);

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    if (toolbar != null) {
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }

    slidingPane = (SlidingPaneLayout) findViewById(R.id.sliding_pane);
    slidingPane.setSliderFadeColor(getResources().getColor(R.color.preference_background));
    slidingPane.setShadowResourceLeft(R.drawable.pane_shadow);
    slidingPane.setPanelSlideListener(new SlidingPaneLayout.SimplePanelSlideListener() {
        @Override
        public void onPanelOpened(View panel) {
            if (isPreferencesOpen()) {
                resetPreferencePane();
            }
        }
    });

    slidingPane.openPane();

    profileAdapter = new ProfileAdapter(this);

    RecyclerView profileList = (RecyclerView) findViewById(R.id.profile_list);

    profileList.setLayoutManager(new LinearLayoutManager(this));
    profileList.setAdapter(profileAdapter);

    fillPreferences();

    getSupportLoaderManager().initLoader(G.PROFILES_LOADER_ID, null, profileLoaderCallbacks);

    boolean showNewProfile = getIntent().getBooleanExtra(G.ARG_NEW_PROFILE, false);

    if (state == null) {
        TransmissionProfile.cleanTemporaryPreferences();

        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
        prefs.registerOnSharedPreferenceChangeListener(defaultPrefListener);

        prefs = getSharedPreferences(TransmissionProfile.getPreferencesName(),
            Activity.MODE_PRIVATE);
        prefs.registerOnSharedPreferenceChangeListener(profilesPrefListener);
    } else {
        showNewProfile = false;
    }

    if (showNewProfile) {
        addFragment("new-profile", Type.PROFILE, null);

        slidingPane.closePane();
    }
}
 
開發者ID:urandom,項目名稱:gearshift,代碼行數:58,代碼來源:SettingsActivity.java


注:本文中的android.support.v4.widget.SlidingPaneLayout.closePane方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。