本文整理汇总了Java中com.slidingmenu.lib.SlidingMenu.setBehindScrollScale方法的典型用法代码示例。如果您正苦于以下问题:Java SlidingMenu.setBehindScrollScale方法的具体用法?Java SlidingMenu.setBehindScrollScale怎么用?Java SlidingMenu.setBehindScrollScale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.slidingmenu.lib.SlidingMenu
的用法示例。
在下文中一共展示了SlidingMenu.setBehindScrollScale方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// set the Above View
setContentView(R.layout.content_frame);
getSupportFragmentManager().beginTransaction()
.replace(R.id.content_frame, new SampleListFragment()).commit();
SlidingMenu sm = getSlidingMenu();
setSlidingActionBarEnabled(true);
sm.setBehindScrollScale(0.0f);
sm.setBehindCanvasTransformer(mTransformer);
}
示例2: onCreate
import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
mMenu = new SlidingMenu(this);
mMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
mMenu.setBehindScrollScale(1f);
mMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
mMenu.setFadeEnabled(true);
mMenu.setFadeDegree(0.35f);
mMenu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
mMenu.setMenu(R.layout.sliding_menu_frame);
mMenu.setOnOpenedListener(new SlidingMenu.OnOpenedListener() {
@Override
public void onOpened() {
TopFragment fragment = (TopFragment) getSupportFragmentManager().findFragmentById(R.id.top_content);
if(fragment != null) {
fragment.onMenuOpen();
}
}
});
MenuFragment menuFragment = new MenuFragment();
menuFragment.setListener(mMenuListener);
getSupportFragmentManager().beginTransaction().replace(R.id.sliding_menu, menuFragment)
.commit();
mMenu.setContent(R.layout.actvy_top);
if(getIntent() != null) {
int page = getIntent().getIntExtra(Const.Intent.SwitchPage, TopFragmentType.NearAppoint.getValue());
change(TopFragmentType.find(page), getIntent().getExtras());
} else {
change(TopFragmentType.NearAppoint, null);
}
upgrade();
}
示例3: onCreate
import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// set the Above View
setContentView(R.layout.content_frame);
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.content_frame, new SampleListFragment())
.commit();
SlidingMenu sm = getSlidingMenu();
setSlidingActionBarEnabled(true);
sm.setBehindScrollScale(0.0f);
sm.setBehindCanvasTransformer(mTransformer);
}
示例4: onCreate
import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.e("test", "responsiveUIActivity on create...........");
instance = this;
setContentView(R.layout.responsive_content_frame);
if (getSupportActionBar() != null)
getSupportActionBar().hide();
ClientSocket client = new ClientSocket(this);
if (client.socket != null)
Log.e("test", "client.socket != null...................");
else
Log.e("test", "client.socket == null...................");
// check if the content frame contains the menu frame
if (findViewById(R.id.menu_frame) == null) {
setBehindContentView(R.layout.menu_frame);
getSlidingMenu().setSlidingEnabled(true);
getSlidingMenu()
.setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE/* TOUCHMODE_FULLSCREEN */);
// show home as up so we can toggle
if (getSupportActionBar() != null)
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
} else {
// add a dummy view
View v = new View(this);
setBehindContentView(v);
getSlidingMenu().setSlidingEnabled(false);
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
}
// set the Above View Fragment
if (savedInstanceState != null)
mContent = getSupportFragmentManager().getFragment(
savedInstanceState, "mContent");
if (mContent == null)
mContent = new MessageFragment()/* BirdGridFragment(0) */;
getSupportFragmentManager().beginTransaction()
.replace(R.id.content_frame, mContent).commit();
// set the Behind View Fragment
getSupportFragmentManager().beginTransaction()
.replace(R.id.menu_frame, new MenuFragment()).commit();
// customize the SlidingMenu
SlidingMenu sm = getSlidingMenu();
sm.setBehindOffsetRes(R.dimen.slidingmenu_offset);
sm.setShadowWidthRes(R.dimen.shadow_width);
sm.setShadowDrawable(R.drawable.shadow);
sm.setBehindScrollScale(0.25f);
sm.setFadeDegree(0.25f);
shared = new SharedPreferencesUtil(this);
Log.e("test", "userinfo.dbid ::" + UserInfo.db_id);
MessageInfo.groupMap = shared.readGroupMapFromShared(UserInfo.db_id
+ "_" + YIKUAIR_GROUP);
}
示例5: onCreate
import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.responsive_ui);
setContentView(R.layout.responsive_content_frame);
// check if the content frame contains the menu frame
if (findViewById(R.id.menu_frame) == null) {
setBehindContentView(R.layout.menu_frame);
getSlidingMenu().setSlidingEnabled(true);
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
// show home as up so we can toggle
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
} else {
// add a dummy view
View v = new View(this);
setBehindContentView(v);
getSlidingMenu().setSlidingEnabled(false);
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
}
// set the Above View Fragment
if (savedInstanceState != null)
mContent = getSupportFragmentManager().getFragment(savedInstanceState, "mContent");
if (mContent == null)
mContent = new BirdGridFragment(0);
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.content_frame, mContent)
.commit();
// set the Behind View Fragment
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.menu_frame, new BirdMenuFragment())
.commit();
// customize the SlidingMenu
SlidingMenu sm = getSlidingMenu();
sm.setBehindOffsetRes(R.dimen.slidingmenu_offset);
sm.setShadowWidthRes(R.dimen.shadow_width);
sm.setShadowDrawable(R.drawable.shadow);
sm.setBehindScrollScale(0.25f);
sm.setFadeDegree(0.25f);
// show the explanation dialog
if (savedInstanceState == null)
new AlertDialog.Builder(this)
.setTitle(R.string.what_is_this)
.setMessage(R.string.responsive_explanation)
.show();
}
示例6: onCreate
import com.slidingmenu.lib.SlidingMenu; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.app_name);
setContentView(R.layout.content_frame);
// check if the content frame contains the menu frame
if (findViewById(R.id.menu_frame) == null) {
setBehindContentView(R.layout.menu_frame);
getSlidingMenu().setSlidingEnabled(true);
getSlidingMenu()
.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
// show home as up so we can toggle
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
} else {
// add a dummy view
View v = new View(this);
setBehindContentView(v);
getSlidingMenu().setSlidingEnabled(false);
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
}
// set the Above View Fragment
if (savedInstanceState != null) {
mContent = getSupportFragmentManager().getFragment(
savedInstanceState, "mContent");
if (mContent == null)
mContent = new ArticleListFragment();
getSupportFragmentManager().beginTransaction()
.replace(R.id.content_frame, mContent).commit();
// here we should concern about SlidingMenu's request and response
}
// set the Behind View Fragment
getSupportFragmentManager().beginTransaction()
.replace(R.id.menu_frame, new SlidingMenuFragment()).commit();
// customize the SlidingMenu
SlidingMenu sm = getSlidingMenu();
sm.setBehindOffsetRes(R.dimen.slidingmenu_offset);
sm.setShadowWidthRes(R.dimen.shadow_width);
sm.setShadowDrawable(R.drawable.shadow);
sm.setBehindScrollScale(0.25f);
sm.setFadeDegree(0.25f);
BusProvider.getInstance().register(this);
}