當前位置: 首頁>>代碼示例>>Java>>正文


Java OnClosedListener類代碼示例

本文整理匯總了Java中com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnClosedListener的典型用法代碼示例。如果您正苦於以下問題:Java OnClosedListener類的具體用法?Java OnClosedListener怎麽用?Java OnClosedListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


OnClosedListener類屬於com.jeremyfeinstein.slidingmenu.lib.SlidingMenu包,在下文中一共展示了OnClosedListener類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: customizeMenu

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnClosedListener; //導入依賴的package包/類
private void customizeMenu() {
	SlidingMenu sm = getSlidingMenu();
	sm.setShadowWidthRes(R.dimen.shadow_width);
	sm.setShadowDrawable(R.drawable.shadow);
	sm.setBehindOffsetRes(R.dimen.slidingmenu_offset);
	sm.setFadeDegree(0.15f);
	sm.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
	sm.setOnOpenedListener(new OnOpenedListener() {
		@Override
		public void onOpened() {
			fragmentChanged();
		}
	});
	
	sm.setOnClosedListener(new OnClosedListener() {
		@Override
		public void onClosed() {
			fragmentChanged();
		}
	});
}
 
開發者ID:buddycloud,項目名稱:buddycloud-android,代碼行數:22,代碼來源:MainActivity.java

示例2: onCreate

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnClosedListener; //導入依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_sliding_menu_sample);

    final SlidingMenu menu = new SlidingMenu(this);
    menu.setMode(SlidingMenu.LEFT);
    menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
    menu.setBehindWidth(getResources().getDimensionPixelSize(
            R.dimen.menu_width));
    menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
    menu.setMenu(R.layout.sliding_menu);

    menu.setOnOpenedListener(new OnOpenedListener() {
        @Override
        public void onOpened() {
            // メニューが開かれた時に呼び出される

        }
    });
    menu.setOnClosedListener(new OnClosedListener() {
        @Override
        public void onClosed() {
            // メニューが閉じた時に呼び出される
        }
    });
    initializeMenuLayout(menu);

    new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {
            menu.showMenu(true);
        }
    }, 4000);

}
 
開發者ID:android-opensource-library-56,項目名稱:android-opensource-library-56,代碼行數:37,代碼來源:SlidingMenuSampleActivity.java

示例3: setOnClosedListener

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnClosedListener; //導入依賴的package包/類
/**
 * 設置關閉監聽事件
 */
public void setOnClosedListener(OnClosedListener l) {
    mClosedListener = l;
}
 
開發者ID:Datatellit,項目名稱:xlight_android_native,代碼行數:7,代碼來源:CustomViewAbove.java

示例4: setOnClosedListener

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnClosedListener; //導入依賴的package包/類
public void setOnClosedListener(OnClosedListener l)
{
    mClosedListener = l;
}
 
開發者ID:HueToYou,項目名稱:ChatExchange-old,代碼行數:5,代碼來源:CustomViewAbove.java

示例5: setOnClosedListener

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnClosedListener; //導入依賴的package包/類
public void setOnClosedListener(OnClosedListener l) {
	mClosedListener = l;
}
 
開發者ID:6ag,項目名稱:LiuAGeAndroid,代碼行數:4,代碼來源:CustomViewAbove.java

示例6: setOnClosedListener

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnClosedListener; //導入依賴的package包/類
public void setOnClosedListener(OnClosedListener l) {
    mClosedListener = l;
}
 
開發者ID:hkq325800,項目名稱:YellowNote,代碼行數:4,代碼來源:CustomViewAbove.java

示例7: setOnClosedListener

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnClosedListener; //導入依賴的package包/類
/**
 * ���ùرռ����¼�
 */
public void setOnClosedListener(OnClosedListener l) {
	mClosedListener = l;
}
 
開發者ID:YeXiaoChao,項目名稱:slidingmenu_library,代碼行數:7,代碼來源:CustomViewAbove.java

示例8: createSlidingMenus

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnClosedListener; //導入依賴的package包/類
/**
 * Create the sliding menus for this activity. If savedInstanceState is not
 * null, the menu fragment can simply be retrieved from the fragment
 * manager.
 * 
 * @param savedInstanceState
 *            If the activity is being re-initialized after previously being
 *            shut down then this Bundle contains the data it most recently
 *            supplied in onSaveInstanceState(Bundle). Note: Otherwise it is
 *            null.
 */
private void createSlidingMenus() {
	SlidingMenu menu = getSlidingMenu();
	menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
	menu.setFadeDegree(0.35f);
	menu.setMenu(R.layout.sliding_menu_frame);
	menu.setBehindOffsetRes(R.dimen.sliding_menu_offset);
	menu.setShadowDrawable(R.drawable.sliding_menu_shadow);
	menu.setShadowWidthRes(R.dimen.sliding_menu_shadow_width);
	menu.setMode(SlidingMenu.LEFT_RIGHT);
	menu.setSecondaryShadowDrawable(R.drawable.sliding_menu_shadow_right);
	menu.setOnClosedListener(new OnClosedListener() {
		@Override
		public void onClosed() {
			closeOptions();
		}
	});

	Fragment optionsLeft = getFragmentManager().findFragmentByTag(
			"LEFT_OPTIONS");
	Fragment optionsRight = getFragmentManager().findFragmentByTag(
			"RIGHT_OPTIONS");
	mLogFragRight = (SlidingMenuLogListFragment) getFragmentManager()
			.findFragmentByTag("RIGHT");
	mLogFragLeft = (SlidingMenuLogListFragment) getFragmentManager()
			.findFragmentByTag("LEFT");

	FragmentTransaction ft;

	// Only create new fragments if they don't exist
	if (mLogFragRight == null || mLogFragLeft == null) {
		mLogFragRight = new SlidingMenuLogListFragment();
		mLogFragLeft = new SlidingMenuLogListFragment();
		ft = getFragmentManager().beginTransaction();
		ft = ft.replace(R.id.sliding_menu_frame2, mLogFragRight, "RIGHT");
		ft = ft.replace(R.id.sliding_menu_frame, mLogFragLeft, "LEFT");
		ft.commit();
	}

	ft = getFragmentManager().beginTransaction();
	mLogFragRight.setControllers(p1Controller, p2Controller);
	mLogFragLeft.setControllers(p1Controller, p2Controller);

	// Restore the options fragments if they exist
	if (optionsRight != null) {
		ft = ft.replace(R.id.sliding_menu_frame2, optionsRight,
				"RIGHT_OPTIONS");
	}

	if (optionsLeft != null) {
		ft = ft.replace(R.id.sliding_menu_frame, optionsLeft,
				"LEFT_OPTIONS");
	}

	// If there are any changes to be done, commit them
	if (!ft.isEmpty()) {
		ft.commit();
	}

	getFragmentManager().executePendingTransactions();

	// set the fragments to be inverted as necessary
	mLogFragRight.setUpperInverted(mPrefs.getBoolean(
			getString(R.string.key_invert), true));
	mLogFragLeft.setUpperInverted(mPrefs.getBoolean(
			getString(R.string.key_invert), true));
}
 
開發者ID:brstf,項目名稱:SimpleLife,代碼行數:78,代碼來源:LifeCount.java


注:本文中的com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnClosedListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。