当前位置: 首页>>代码示例>>Java>>正文


Java SlidingPaneLayout.openPane方法代码示例

本文整理汇总了Java中android.support.v4.widget.SlidingPaneLayout.openPane方法的典型用法代码示例。如果您正苦于以下问题:Java SlidingPaneLayout.openPane方法的具体用法?Java SlidingPaneLayout.openPane怎么用?Java SlidingPaneLayout.openPane使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v4.widget.SlidingPaneLayout的用法示例。


在下文中一共展示了SlidingPaneLayout.openPane方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import android.support.v4.widget.SlidingPaneLayout; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.sliding_pane_layout);

    mSlidingLayout = (SlidingPaneLayout) findViewById(R.id.sliding_pane_layout);
    mList = (ListView) findViewById(R.id.left_pane);
    mContent = (TextView) findViewById(R.id.content_text);

    mSlidingLayout.setPanelSlideListener(new SliderListener());
    mSlidingLayout.openPane();

    mList.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,
            Shakespeare.TITLES));
    mList.setOnItemClickListener(new ListItemClickListener());

    mActionBar = createActionBarHelper();
    mActionBar.init();

    mSlidingLayout.getViewTreeObserver().addOnGlobalLayoutListener(new FirstLayoutListener());
}
 
开发者ID:reknih,项目名称:informant-droid,代码行数:23,代码来源:SlidingPaneLayoutActivity.java

示例2: showConversationsOverview

import android.support.v4.widget.SlidingPaneLayout; //导入方法依赖的package包/类
public void showConversationsOverview() {
	if (mContentView instanceof SlidingPaneLayout) {
		SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
		mShouldPanelBeOpen.set(true);
		mSlidingPaneLayout.openPane();
	}
}
 
开发者ID:syntafin,项目名称:TenguChat,代码行数:8,代码来源:ConversationActivity.java

示例3: injectLayout

import android.support.v4.widget.SlidingPaneLayout; //导入方法依赖的package包/类
private void injectLayout() {
	// for panel
	mSlidingPaneLayout = (SlidingPaneLayout) findViewById(R.id.sliding_pane_layout);
	mEmotions = (GridView) findViewById(R.id.emotions);
	mEmotions.setAdapter(new EmotionsAdapter(this));
	mEmotions.setOnItemClickListener(this);
	mSlidingPaneLayout.setPanelSlideListener(new SliderListener());
	mSlidingPaneLayout.openPane();
	mSlidingPaneLayout.getViewTreeObserver().addOnGlobalLayoutListener(new FirstLayoutListener());
	// for tweet
	mAvatar = (ImageView) findViewById(R.id.avatar);
	mScreenName = (TextView) findViewById(R.id.screen_name);
	mText = (EditText) findViewById(R.id.text);
	mLocationMarker = findViewById(R.id.location_marker);
	// set data to layout...
	new AsyncQueryHandler(getContentResolver()) {
		@Override
		protected void onQueryComplete(int token, Object cookie, Cursor cursor) {
			if (cursor.moveToNext()) {
				Picasso.with(ComposeTweetActivity.this)
						.load(cursor.getString(cursor.getColumnIndex(User.avatar_large)))
						.placeholder(R.drawable.error)
						.error(R.drawable.error)
						.into(mAvatar);
				mScreenName.setText("@" + cursor.getString(cursor.getColumnIndex(User.screen_name)));
			}
			cursor.close();
		}
	}.startQuery(0, null,
			CatnutProvider.parse(User.MULTIPLE, mApp.getAccessToken().uid),
			new String[]{User.avatar_large, User.screen_name}, null, null, null);
	// other stuffs...
	mText.addTextChangedListener(this);
}
 
开发者ID:missmisslonely,项目名称:fakeweibo,代码行数:35,代码来源:ComposeTweetActivity.java

示例4: showConversationsOverview

import android.support.v4.widget.SlidingPaneLayout; //导入方法依赖的package包/类
public void showConversationsOverview() {
    if (mConversationFragment != null) {
        mConversationFragment.stopScrolling();
    }
    if (mContentView instanceof SlidingPaneLayout) {
        SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
        mShouldPanelBeOpen.set(true);
        mSlidingPaneLayout.openPane();
    }
}
 
开发者ID:kriztan,项目名称:Pix-Art-Messenger,代码行数:11,代码来源:ConversationActivity.java

示例5: initViews

import android.support.v4.widget.SlidingPaneLayout; //导入方法依赖的package包/类
private void initViews(Bundle savedInstanceState) {
    mSlidingPane = (SlidingPaneLayout) findViewById(R.id.sliding_pane);
    mSlidingPane.setShadowResource(R.drawable.drawer_shadow);
    if (savedInstanceState == null) {

        getSupportFragmentManager().beginTransaction().add(R.id.pane1, UserFragment.newInstance(mUsername), "pane1").commit();
        getSupportFragmentManager().beginTransaction().add(R.id.pane2, UserActionsFragment.newInstance(mUsername, UserActionsFragment.TYPE_ALL), "pane1").commit();
    }
    mSlidingPane.openPane();
}
 
开发者ID:goodev,项目名称:android-discourse,代码行数:11,代码来源:UserActivity.java

示例6: onCreate

import android.support.v4.widget.SlidingPaneLayout; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
    slidingPanelLayout = (SlidingPaneLayout) findViewById(R.id.sliding_panel_layout);

    if (slidingPanelLayout != null) {
        slidingPanelLayout.openPane();
        noServiceTextView = (TextView) findViewById(R.id.no_service);
        serviceNameTextView = (TextView) findViewById(R.id.service_name);
        lastUpdatedTextView = (TextView) findViewById(R.id.last_updated);
    }

    if (savedInstanceState == null) {
        domain = "local.";
        getSupportFragmentManager().beginTransaction().
                replace(R.id.first_panel, RegTypeBrowserFragment.newInstance(Config.TCP_REG_TYPE_SUFFIX)).commit();
    }
    else{
        domain = savedInstanceState.getString(PARAM_DOMAIN);
        regType = savedInstanceState.getString(PARAM_REG_TYPE);
        serviceName = savedInstanceState.getString(PARAM_SERVICE_NAME);
    }

    updateNavigation();
}
 
开发者ID:andriydruk,项目名称:BonjourBrowser,代码行数:28,代码来源:MainActivity.java

示例7: 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

示例8: showConversationsOverview

import android.support.v4.widget.SlidingPaneLayout; //导入方法依赖的package包/类
public void showConversationsOverview() {
	if (mConversationFragment != null) {
		mConversationFragment.stopScrolling();
	}
	if (mContentView instanceof SlidingPaneLayout) {
		SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
		mShouldPanelBeOpen.set(true);
		mSlidingPaneLayout.openPane();
	}
}
 
开发者ID:siacs,项目名称:Conversations,代码行数:11,代码来源:ConversationActivity.java

示例9: showConversationsOverview

import android.support.v4.widget.SlidingPaneLayout; //导入方法依赖的package包/类
public void showConversationsOverview() {
	if (mContentView instanceof SlidingPaneLayout) {
		SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
		mSlidingPaneLayout.openPane();
	}
}
 
开发者ID:xavierle,项目名称:messengerxmpp,代码行数:7,代码来源:ConversationActivity.java

示例10: 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.openPane方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。