当前位置: 首页>>代码示例>>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;未经允许,请勿转载。