protected internal override void initControlBar(Activity activity, TypedArray array)
        {
            base.initControlBar(activity, array);
            mInitOrientation = array.getInt(R.styleable.FloatingControler_orientation, HORIZONTAL);
            int handleDrawable = array.getResourceId(R.styleable.FloatingControler_handle_drawable, 0);

            mBarAlignment = array.getInt(R.styleable.FloatingControler_bar_alignment, DEFAULT_POSITION);
            prepareBarState();
            try
            {
                mControlBar = createControlBar(activity, handleDrawable);
            }
            catch (NotActivityException e)
            {
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
            }
        }
Exemplo n.º 2
0
        protected internal virtual void initControlBar(Activity activity, bool barExpanded, IDictionary <string, bool?> devicesExpanded, TypedArray array)
        {
            base.initControlBar(activity, array);
            int handleDrawable = array.getResourceId(R.styleable.FloatingControler_handle_drawable, 0);

            mBarAlignment = array.getInt(R.styleable.FloatingControler_bar_alignment, ALIGN_PARENT_TOP);
            ControlBar.Info info = new ControlBar.Info(true, null, handleDrawable);
            try
            {
                this.mControlBar = new ControlBarAnonymousInnerClassHelper(this, activity, info);
                IDictionary <int?, int?> map = new SortedDictionary <int?, int?>();
                map[LinearLayout.HORIZONTAL] = R.drawable.ctrl_action_horiz_end;
                map[LinearLayout.VERTICAL]   = R.drawable.ctrl_action_vert_end;
                mControlBar.EndImageMap      = map;
            }
            catch (NotActivityException e)
            {
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
            }
        }