Пример #1
0
        //public
        override void onCreate(Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);



            StandOutWindow.closeAll(this, typeof(XWidgetsWindow).ToClass());
            StandOutWindow.show(this, typeof(XWidgetsWindow).ToClass(), StandOutWindow.DEFAULT_ID);

            this.finish();
        }
Пример #2
0
 public Intent GetPersistentNotificationIntent(int id)
 {
     return(StandOutWindow.getCloseAllIntent(this, typeof(FloatingFolder)));
 }
Пример #3
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: public Window(final wei.mark.standout.StandOutWindow context, final int id)
        public Window(StandOutWindow context, int id) : base(context)
        {
            context.SetTheme(context.ThemeStyle);

            mContext        = context;
            mLayoutInflater = LayoutInflater.From(context);

            this.cls            = context.GetType();
            this.id             = id;
            this.originalParams = context.getParams(id, this);
            this.flags          = context.getFlags(id);
            this.touchInfo      = new TouchInfo();
            touchInfo.ratio     = (float)originalParams.Width / originalParams.Height;
            this.data           = new Bundle();
            DisplayMetrics metrics = mContext.Resources.DisplayMetrics;

            displayWidth  = metrics.WidthPixels;
            displayHeight = (int)(metrics.HeightPixels - 25 * metrics.Density);

            // create the window contents
            View        content;
            FrameLayout body;

            if (Utils.isSet(flags, StandOutFlags.FLAG_DECORATION_SYSTEM))
            {
                // requested system window decorations
                content = SystemDecorations;
                body    = (FrameLayout)content.FindViewById(R.Id.body);
            }
            else
            {
                // did not request decorations. will provide own implementation
                content    = new FrameLayout(context);
                content.Id = R.Id.content;
                body       = (FrameLayout)content;
            }

            AddView(content);

            //TODO
            body.SetOnTouchListener(new OnTouchListenerAnonymousInnerClassHelper(this, context, id));

            // attach the view corresponding to the id from the
            // implementation
            context.CreateAndAttachView(id, body);

            // make sure the implementation attached the view
            if (body.ChildCount == 0)
            {
                throw new Exception("You must attach your view to the given frame in createAndAttachView()");
            }

            // implement StandOut specific workarounds
            if (!Utils.isSet(flags, StandOutFlags.FLAG_FIX_COMPATIBILITY_ALL_DISABLE))
            {
                fixCompatibility(body);
            }
            // implement StandOut specific additional functionality
            if (!Utils.isSet(flags, StandOutFlags.FLAG_ADD_FUNCTIONALITY_ALL_DISABLE))
            {
                addFunctionality(body);
            }

            // attach the existing tag from the frame to the window
            Tag = body.Tag;
        }
Пример #4
0
 public Window(Context context) : base(context)
 {
     mContext = null;
 }
Пример #5
0
 public OnTouchListenerAnonymousInnerClassHelper(Window outerInstance, StandOutWindow context, int id)
 {
     this.outerInstance = outerInstance;
     this.context       = context;
     this.id            = id;
 }
Пример #6
0
 public override Intent getPersistentNotificationIntent(int id)
 {
     return(StandOutWindow.getCloseIntent(this, typeof(SimpleWindow).ToClass(), id));
 }