android.widget.SlidingDrawer源码实例Demo

类android.widget.SlidingDrawer源码实例Demo

下面列出了android.widget.SlidingDrawer 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: AndroidRipper   文件: Setter.java
/**
 * Sets the status of a given SlidingDrawer. Examples are Solo.CLOSED and Solo.OPENED.
 *
 * @param slidingDrawer the {@link SlidingDrawer}
 * @param status the status that the {@link SlidingDrawer} should be set to
 */

public void setSlidingDrawer(final SlidingDrawer slidingDrawer, final int status){
	if(slidingDrawer != null){
		Activity activity = activityUtils.getCurrentActivity(false);
		if(activity != null){
			activity.runOnUiThread(new Runnable()
			{
				public void run()
				{
					try{
						switch (status) {
						case CLOSED:
							slidingDrawer.close();
							break;
						case OPENED:
							slidingDrawer.open();
							break;
						}
					}catch (Exception ignored){}
				}
			});
		}
	}
}
 
源代码2 项目: AndroidRipper   文件: Solo.java
/**
 * Sets the status of a SlidingDrawer matching the specified index. Examples of status are: {@code Solo.CLOSED} and {@code Solo.OPENED}.
 *
 * @param index the index of the {@link SlidingDrawer}
 * @param status the status to set the {@link SlidingDrawer}
 */

public void setSlidingDrawer(int index, int status){
	if(config.commandLogging){
		Log.d(config.commandLoggingTag, "setSlidingDrawer("+index+", "+status+")");
	}
	
	setSlidingDrawer(waiter.waitForAndGetView(index, SlidingDrawer.class), status);
}
 
源代码3 项目: utexas-utilities   文件: WrappingSlidingDrawer.java
public WrappingSlidingDrawer(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);

    int orientation = attrs
            .getAttributeIntValue("android", "orientation", ORIENTATION_VERTICAL);
    mTopOffset = attrs.getAttributeIntValue("android", "topOffset", 0);
    mVertical = (orientation == SlidingDrawer.ORIENTATION_VERTICAL);
}
 
源代码4 项目: utexas-utilities   文件: WrappingSlidingDrawer.java
public WrappingSlidingDrawer(Context context, AttributeSet attrs) {
    super(context, attrs);

    int orientation = attrs
            .getAttributeIntValue("android", "orientation", ORIENTATION_VERTICAL);
    mTopOffset = attrs.getAttributeIntValue("android", "topOffset", 0);
    mVertical = (orientation == SlidingDrawer.ORIENTATION_VERTICAL);
}
 
源代码5 项目: anvil   文件: DSL.java
public static BaseDSL.ViewClassResult slidingDrawer() {
  return BaseDSL.v(SlidingDrawer.class);
}
 
源代码6 项目: anvil   文件: DSL.java
public static Void slidingDrawer(Anvil.Renderable r) {
  return BaseDSL.v(SlidingDrawer.class, r);
}
 
源代码7 项目: anvil   文件: DSL.java
public static Void onDrawerClose(SlidingDrawer.OnDrawerCloseListener arg) {
  return BaseDSL.attr("onDrawerClose", arg);
}
 
源代码8 项目: anvil   文件: DSL.java
public static Void onDrawerOpen(SlidingDrawer.OnDrawerOpenListener arg) {
  return BaseDSL.attr("onDrawerOpen", arg);
}
 
源代码9 项目: anvil   文件: DSL.java
public static Void onDrawerScroll(SlidingDrawer.OnDrawerScrollListener arg) {
  return BaseDSL.attr("onDrawerScroll", arg);
}
 
源代码10 项目: anvil   文件: DSL.java
public static BaseDSL.ViewClassResult slidingDrawer() {
  return BaseDSL.v(SlidingDrawer.class);
}
 
源代码11 项目: anvil   文件: DSL.java
public static Void slidingDrawer(Anvil.Renderable r) {
  return BaseDSL.v(SlidingDrawer.class, r);
}
 
源代码12 项目: anvil   文件: DSL.java
public static Void onDrawerClose(SlidingDrawer.OnDrawerCloseListener arg) {
  return BaseDSL.attr("onDrawerClose", arg);
}
 
源代码13 项目: anvil   文件: DSL.java
public static Void onDrawerOpen(SlidingDrawer.OnDrawerOpenListener arg) {
  return BaseDSL.attr("onDrawerOpen", arg);
}
 
源代码14 项目: anvil   文件: DSL.java
public static Void onDrawerScroll(SlidingDrawer.OnDrawerScrollListener arg) {
  return BaseDSL.attr("onDrawerScroll", arg);
}
 
源代码15 项目: android-vlc-remote   文件: BrowseDrawerListener.java
public BrowseDrawerListener(Activity activity, SlidingDrawer drawer, BrowseFragment browse) {
    mActivity = activity;
    mDrawer = drawer;
    mBrowse = browse;
}
 
源代码16 项目: android-vlc-remote   文件: PlaybackActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_PROGRESS);
    setContentView(R.layout.main);
    
    // Set the control stream to STREAM_MUSIC to suppress system beeps
    // that sound even when the activity handles volume key events.
    setVolumeControlStream(AudioManager.STREAM_MUSIC);

    Preferences pref = Preferences.get(this);
    isHideDVDTab = pref.isHideDVDTabSet();
    String authority = pref.getAuthority();
    if (authority != null) {
        mMediaServer = new MediaServer(this, authority);
        setServerSubtitle(pref.isServerSubtitleSet());
    }
    
    mFlipper = (ViewFlipper) findViewById(R.id.flipper);
    mPager = (LockableViewPager) findViewById(R.id.pager);
    mTabHost = (TabHost) findViewById(android.R.id.tabhost);
    mVolumePanel = new VolumePanel(this);
    
    BrowseFragment browse = null;
    FragmentUtil fu = new FragmentUtil(getSupportFragmentManager());
    fu.findOrAddFragment(Tags.FRAGMENT_STATUS, StatusFragment.class);
    
    if(mTabHost == null) {
        fu.findOrReplaceOptionalFragment(this, R.id.fragment_navigation, Tags.FRAGMENT_NAVIGATION, NavigationFragment.class);
        fu.findOrReplaceFragment(R.id.fragment_playlist, Tags.FRAGMENT_PLAYLIST, PlaylistFragment.class);
        browse = fu.findOrReplaceFragment(R.id.fragment_browse, Tags.FRAGMENT_BROWSE, BrowseFragment.class);
        fu.findOrReplaceFragment(R.id.fragment_playback, Tags.FRAGMENT_PLAYBACK, PlaybackFragment.class);
        fu.findOrReplaceFragment(R.id.fragment_info, Tags.FRAGMENT_INFO, InfoFragment.class);
        fu.findOrReplaceOptionalFragment(this, R.id.fragment_art, Tags.FRAGMENT_ART, ArtFragment.class);
        fu.findOrReplaceFragment(R.id.fragment_buttons, Tags.FRAGMENT_BUTTONS, ButtonsFragment.class);
        VolumeFragment mVolume = fu.findOrReplaceFragment(R.id.fragment_volume, Tags.FRAGMENT_VOLUME, VolumeFragment.class);
        setVolumeFragmentVisible(mVolume != null);
    } else {
        setupTabHost();
        mPager.setOffscreenPageLimit(4);
        mPager.setAdapter(new ViewPagerAdapter(getSupportFragmentManager(), pref.isHideDVDTabSet()));
        mPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
            @Override
            public void onPageSelected(int position) {
                mTabHost.setCurrentTab(position);
            }
        });
        if(savedInstanceState != null) {
            fu.removeFragmentsByTag(
                Tags.FRAGMENT_PLAYBACK, Tags.FRAGMENT_INFO, Tags.FRAGMENT_BUTTONS,
                Tags.FRAGMENT_VOLUME, Tags.FRAGMENT_BOTTOMBAR, Tags.FRAGMENT_BROWSE,
                Tags.FRAGMENT_NAVIGATION, Tags.FRAGMENT_PLAYLIST
            );
        }
    }

    mDrawer = (SlidingDrawer) findViewById(R.id.drawer);
    if (mDrawer != null) {
        BrowseDrawerListener listener = new BrowseDrawerListener(this, mDrawer, browse);
        mDrawer.setOnDrawerOpenListener(listener);
        mDrawer.setOnDrawerCloseListener(listener);
    }
    
    if (savedInstanceState == null) {
        onNewIntent(getIntent());
    } else {
        notifyMediaServerListeners();
    }
}
 
源代码17 项目: assertj-android   文件: SlidingDrawerAssert.java
public SlidingDrawerAssert(SlidingDrawer actual) {
  super(actual, SlidingDrawerAssert.class);
}
 
如果文章对您有帮助,请点击页面广告。以鼓励作者做出的努力。
 类所在包
 同包方法