本文整理汇总了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();
}
}