本文整理匯總了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();
}
}
示例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();
}
}
示例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();
}
}
};
}
示例4: hideConversationsOverview
import android.support.v4.widget.SlidingPaneLayout; //導入方法依賴的package包/類
public void hideConversationsOverview() {
if (mContentView instanceof SlidingPaneLayout) {
SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
mSlidingPaneLayout.closePane();
}
}
示例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();
}
}