use of com.jeremyfeinstein.slidingmenu.lib.SlidingMenu in project ChatExchange by HueToYou.
the class ChatFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
view = inflater.inflate(R.layout.fragment_chat, container, false);
mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
hueUtils = new HueUtils();
// configure the SlidingMenu
mSlidingMenu = new SlidingMenu(getActivity());
mSlidingMenu.setMode(SlidingMenu.RIGHT);
mSlidingMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
mSlidingMenu.setShadowWidthRes(R.dimen.shadow_width);
mSlidingMenu.setShadowDrawable(new ColorDrawable(getResources().getColor(R.color.transparentGrey)));
// mSlidingMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
// mSlidingMenu.setBehindOffset((int)(dpWidth + getResources().getDimension(R.dimen.user_tile_width)));
// mSlidingMenu.setLayoutParams(new ActionBar.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
mSlidingMenu.setBehindWidthRes(R.dimen.sliding_menu_width);
mSlidingMenu.setFadeDegree(0.35f);
mSlidingMenu.attachToActivity(getActivity(), SlidingMenu.SLIDING_CONTENT);
mSlidingMenu.setMenu(R.layout.users_slideout);
Bundle args = getArguments();
String chatUrl = args.getString("chatUrl", "ERROR");
mAppBarColor = args.getInt("AppBarColor", -1);
addChatButtons(chatUrl);
ParseUsers asyncTask = new ParseUsers();
CancelTask canceller = new CancelTask(asyncTask);
Handler handler = new Handler();
handler.postDelayed(canceller, 10000);
asyncTask.execute(chatUrl);
getActivity().setTitle(args.getString("chatTitle", "Error"));
//call addUser() here somehow....
return view;
}
Aggregations