예제 #1
0
        public ViewAnimator(android.content.Context context, android.util.AttributeSet attrs
                            ) : base(context, attrs)
        {
            android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                              .styleable.ViewAnimator);
            int resource = a.getResourceId([email protected]_inAnimation
                                           , 0);

            if (resource > 0)
            {
                setInAnimation(context, resource);
            }
            resource = a.getResourceId([email protected]_outAnimation
                                       , 0);
            if (resource > 0)
            {
                setOutAnimation(context, resource);
            }
            bool flag = a.getBoolean([email protected]_animateFirstView
                                     , true);

            setAnimateFirstView(flag);
            a.recycle();
            initViewAnimator(context, attrs);
        }
예제 #2
0
 public AnalogClock(android.content.Context context, android.util.AttributeSet attrs
                    , int defStyle) : base(context, attrs, defStyle)
 {
     mIntentReceiver = new _BroadcastReceiver_236(this);
     android.content.res.Resources  r = mContext.getResources();
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.AnalogClock, defStyle, 0);
     mDial = a.getDrawable([email protected]_dial);
     if (mDial == null)
     {
         mDial = r.getDrawable([email protected]_dial);
     }
     mHourHand = a.getDrawable([email protected]_hand_hour);
     if (mHourHand == null)
     {
         mHourHand = r.getDrawable([email protected]_hand_hour);
     }
     mMinuteHand = a.getDrawable([email protected]_hand_minute
                                 );
     if (mMinuteHand == null)
     {
         mMinuteHand = r.getDrawable([email protected]_hand_minute);
     }
     mCalendar   = new android.text.format.Time();
     mDialWidth  = mDial.getIntrinsicWidth();
     mDialHeight = mDial.getIntrinsicHeight();
 }
예제 #3
0
 public TwoLineListItem(android.content.Context context, android.util.AttributeSet
                        attrs, int defStyle) : base(context, attrs, defStyle)
 {
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.TwoLineListItem, defStyle, 0);
     a.recycle();
 }
예제 #4
0
 protected internal override bool inflateTag(string name, android.content.res.Resources
                                             r, org.xmlpull.v1.XmlPullParser parser, android.util.AttributeSet attrs)
 {
     if (name.Equals("corners"))
     {
         android.content.res.TypedArray a = r.obtainAttributes(attrs, [email protected].
                                                               styleable.DrawableCorners);
         int radius = a.getDimensionPixelSize([email protected]_radius
                                              , 0);
         setCornerRadius(radius);
         // now check of they have any per-corner radii
         int topLeftRadius = a.getDimensionPixelSize([email protected]_topLeftRadius
                                                     , radius);
         int topRightRadius = a.getDimensionPixelSize([email protected]_topRightRadius
                                                      , radius);
         int bottomLeftRadius = a.getDimensionPixelSize([email protected]_bottomLeftRadius
                                                        , radius);
         int bottomRightRadius = a.getDimensionPixelSize([email protected]_bottomRightRadius
                                                         , radius);
         if (topLeftRadius != radius || topRightRadius != radius || bottomLeftRadius != radius ||
             bottomRightRadius != radius)
         {
             setCornerRadii(new float[] { topLeftRadius, topLeftRadius, topRightRadius, topRightRadius
                                          , bottomLeftRadius, bottomLeftRadius, bottomRightRadius, bottomRightRadius });
         }
         a.recycle();
         return(true);
     }
     return(base.inflateTag(name, r, parser, attrs));
 }
        /// <summary>Creates a new layout animation controller from external resources.</summary>
        /// <remarks>Creates a new layout animation controller from external resources.</remarks>
        /// <param name="context">
        /// the Context the view  group is running in, through which
        /// it can access the resources
        /// </param>
        /// <param name="attrs">
        /// the attributes of the XML tag that is inflating the
        /// layout animation controller
        /// </param>
        public LayoutAnimationController(android.content.Context context, android.util.AttributeSet
                                         attrs)
        {
            android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                              .styleable.LayoutAnimation);
            android.view.animation.Animation.Description d = android.view.animation.Animation
                                                             .Description.parseValue(a.peekValue([email protected]_delay
                                                                                                 ));
            mDelay = d.value;
            mOrder = a.getInt([email protected]_animationOrder, ORDER_NORMAL
                              );
            int resource = a.getResourceId([email protected]_animation
                                           , 0);

            if (resource > 0)
            {
                setAnimation(context, resource);
            }
            resource = a.getResourceId([email protected]_interpolator
                                       , 0);
            if (resource > 0)
            {
                setInterpolator(context, resource);
            }
            a.recycle();
        }
예제 #6
0
 /// <summary>Constructor used when an AnimationSet is loaded from a resource.</summary>
 /// <remarks>Constructor used when an AnimationSet is loaded from a resource.</remarks>
 /// <param name="context">Application context to use</param>
 /// <param name="attrs">Attribute set from which to read values</param>
 public AnimationSet(android.content.Context context, android.util.AttributeSet attrs
                     ) : base(context, attrs)
 {
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.AnimationSet);
     setFlag(PROPERTY_SHARE_INTERPOLATOR_MASK, a.getBoolean([email protected]
                                                            .AnimationSet_shareInterpolator, true));
     init();
     if (context.getApplicationInfo().targetSdkVersion >= android.os.Build.VERSION_CODES
         .ICE_CREAM_SANDWICH)
     {
         if (a.hasValue([email protected]_duration))
         {
             mFlags |= PROPERTY_DURATION_MASK;
         }
         if (a.hasValue([email protected]_fillBefore))
         {
             mFlags |= PROPERTY_FILL_BEFORE_MASK;
         }
         if (a.hasValue([email protected]_fillAfter))
         {
             mFlags |= PROPERTY_FILL_AFTER_MASK;
         }
         if (a.hasValue([email protected]_repeatMode))
         {
             mFlags |= PROPERTY_REPEAT_MODE_MASK;
         }
         if (a.hasValue([email protected]_startOffset))
         {
             mFlags |= PROPERTY_START_OFFSET_MASK;
         }
     }
     a.recycle();
 }
예제 #7
0
        public RatingBar(android.content.Context context, android.util.AttributeSet attrs
                         , int defStyle) : base(context, attrs, defStyle)
        {
            android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                              .styleable.RatingBar, defStyle, 0);
            int numStars = a.getInt([email protected]_numStars, mNumStars
                                    );

            setIsIndicator(a.getBoolean([email protected]_isIndicator,
                                        !mIsUserSeekable));
            float rating   = a.getFloat([email protected]_rating, -1);
            float stepSize = a.getFloat([email protected]_stepSize, -1);

            a.recycle();
            if (numStars > 0 && numStars != mNumStars)
            {
                setNumStars(numStars);
            }
            if (stepSize >= 0)
            {
                setStepSize(stepSize);
            }
            else
            {
                setStepSize(0.5f);
            }
            if (rating >= 0)
            {
                setRating(rating);
            }
            // A touch inside a star fill up to that fractional area (slightly more
            // than 1 so boundaries round up).
            mTouchProgressOffset = 1.1f;
        }
예제 #8
0
 protected internal override void onMeasure(int widthMeasureSpec, int heightMeasureSpec
                                            )
 {
     base.onMeasure(widthMeasureSpec, heightMeasureSpec);
     android.text.Layout layout_1 = getLayout();
     if (layout_1 != null)
     {
         int lineCount = layout_1.getLineCount();
         if (lineCount > 0)
         {
             int ellipsisCount = layout_1.getEllipsisCount(lineCount - 1);
             if (ellipsisCount > 0)
             {
                 setSingleLine(false);
                 setMaxLines(2);
                 android.content.res.TypedArray a = mContext.obtainStyledAttributes(null, android.R
                                                                                    .styleable.TextAppearance, android.R.attr.textAppearanceMedium, android.R.style.
                                                                                    TextAppearance_Medium);
                 int textSize = a.getDimensionPixelSize(android.R.styleable.TextAppearance_textSize
                                                        , 0);
                 if (textSize != 0)
                 {
                     // textSize is already expressed in pixels
                     setTextSize(android.util.TypedValue.COMPLEX_UNIT_PX, textSize);
                 }
                 a.recycle();
                 base.onMeasure(widthMeasureSpec, heightMeasureSpec);
             }
         }
     }
 }
예제 #9
0
        public KeyButton(Context context, AttributeSet attrs) : base(context, attrs)
        {
            TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.KeyButton);

            mNote     = a.getInteger(R.styleable.KeyButton_note, 69);
            mVelocity = a.getInteger(R.styleable.KeyButton_velocity, 80);

            a.recycle();
        }
예제 #10
0
 public OvershootInterpolator(android.content.Context context, android.util.AttributeSet
                              attrs)
 {
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.OvershootInterpolator);
     mTension = a.getFloat([email protected]_tension
                           , 2.0f);
     a.recycle();
 }
예제 #11
0
 public CycleInterpolator(android.content.Context context, android.util.AttributeSet
                          attrs)
 {
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.CycleInterpolator);
     mCycles = a.getFloat([email protected]_cycles, 1.0f
                          );
     a.recycle();
 }
예제 #12
0
 public FcRecycleView(Context context, AttributeSet attrs, int defStyle) : base(context, attrs, defStyle)
 {
     if (attrs != null)
     {
         TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.FcRecycleView, 0, 0);
         mMaxWidth = array.getLayoutDimension(R.styleable.FcRecycleView_max_width, LayoutParams.MATCH_PARENT);
         array.recycle();
     }
 }
예제 #13
0
 /// <summary><inheritDoc></inheritDoc></summary>
 public LayoutParams(android.content.Context c, android.util.AttributeSet attrs) :
     base(c, attrs)
 {
     android.content.res.TypedArray a = c.obtainStyledAttributes(attrs, [email protected]
                                                                 .styleable.FrameLayout_Layout);
     gravity = a.getInt([email protected]_Layout_layout_gravity
                        , -1);
     a.recycle();
 }
예제 #14
0
 public DecelerateInterpolator(android.content.Context context, android.util.AttributeSet
                               attrs)
 {
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.DecelerateInterpolator);
     mFactor = a.getFloat([email protected]_factor,
                          1.0f);
     a.recycle();
 }
예제 #15
0
        public override void inflate(android.content.res.Resources r, org.xmlpull.v1.XmlPullParser
                                     parser, android.util.AttributeSet attrs)
        {
            base.inflate(r, parser, attrs);
            android.content.res.TypedArray a = r.obtainAttributes(attrs, [email protected].
                                                                  styleable.NinePatchDrawable);
            int id = a.getResourceId([email protected]_src, 0);

            if (id == 0)
            {
                throw new org.xmlpull.v1.XmlPullParserException(parser.getPositionDescription() +
                                                                ": <nine-patch> requires a valid src attribute");
            }
            bool dither = a.getBoolean([email protected]_dither
                                       , DEFAULT_DITHER);

            android.graphics.BitmapFactory.Options options = new android.graphics.BitmapFactory
                                                             .Options();
            if (dither)
            {
                options.inDither = false;
            }
            options.inScreenDensity = android.util.DisplayMetrics.DENSITY_DEVICE;
            android.graphics.Rect   padding = new android.graphics.Rect();
            android.graphics.Bitmap bitmap  = null;
            try
            {
                android.util.TypedValue value = new android.util.TypedValue();
                java.io.InputStream     @is   = r.openRawResource(id, value);
                bitmap = android.graphics.BitmapFactory.decodeResourceStream(r, value, @is, padding
                                                                             , options);
                @is.close();
            }
            catch (System.IO.IOException)
            {
            }
            // Ignore
            if (bitmap == null)
            {
                throw new org.xmlpull.v1.XmlPullParserException(parser.getPositionDescription() +
                                                                ": <nine-patch> requires a valid src attribute");
            }
            else
            {
                if (bitmap.getNinePatchChunk() == null)
                {
                    throw new org.xmlpull.v1.XmlPullParserException(parser.getPositionDescription() +
                                                                    ": <nine-patch> requires a valid 9-patch source image");
                }
            }
            setNinePatchState(new android.graphics.drawable.NinePatchDrawable.NinePatchState(
                                  new android.graphics.NinePatch(bitmap, bitmap.getNinePatchChunk(), "XML 9-patch"
                                                                 ), padding, dither), r);
            mNinePatchState.mTargetDensity = mTargetDensity;
            a.recycle();
        }
예제 #16
0
        public override void inflate(android.content.res.Resources r, org.xmlpull.v1.XmlPullParser
                                     parser, android.util.AttributeSet attrs)
        {
            base.inflate(r, parser, attrs);
            int type;
            int low        = 0;
            int innerDepth = parser.getDepth() + 1;
            int depth;

            while ((type = parser.next()) != org.xmlpull.v1.XmlPullParserClass.END_DOCUMENT &&
                   ((depth = parser.getDepth()) >= innerDepth || type != org.xmlpull.v1.XmlPullParserClass.END_TAG
                   ))
            {
                if (type != org.xmlpull.v1.XmlPullParserClass.START_TAG)
                {
                    continue;
                }
                if (depth > innerDepth || !parser.getName().Equals("item"))
                {
                    continue;
                }
                android.content.res.TypedArray a = r.obtainAttributes(attrs, [email protected].
                                                                      styleable.LevelListDrawableItem);
                low = a.getInt([email protected]_minLevel, 0);
                int high = a.getInt([email protected]_maxLevel,
                                    0);
                int drawableRes = a.getResourceId([email protected]_drawable
                                                  , 0);
                a.recycle();
                if (high < 0)
                {
                    throw new org.xmlpull.v1.XmlPullParserException(parser.getPositionDescription() +
                                                                    ": <item> tag requires a 'maxLevel' attribute");
                }
                android.graphics.drawable.Drawable dr;
                if (drawableRes != 0)
                {
                    dr = r.getDrawable(drawableRes);
                }
                else
                {
                    while ((type = parser.next()) == org.xmlpull.v1.XmlPullParserClass.TEXT)
                    {
                    }
                    if (type != org.xmlpull.v1.XmlPullParserClass.START_TAG)
                    {
                        throw new org.xmlpull.v1.XmlPullParserException(parser.getPositionDescription() +
                                                                        ": <item> tag requires a 'drawable' attribute or " + "child tag defining a drawable"
                                                                        );
                    }
                    dr = android.graphics.drawable.Drawable.createFromXmlInner(r, parser, attrs);
                }
                mLevelListState.addLevel(low, high, dr);
            }
            onLevelChange(getLevel());
        }
 public AnticipateOvershootInterpolator(android.content.Context context, android.util.AttributeSet
                                        attrs)
 {
     android.content.res.TypedArray a_1 = context.obtainStyledAttributes(attrs, [email protected]
                                                                         .styleable.AnticipateOvershootInterpolator);
     mTension = a_1.getFloat([email protected]_tension
                             , 2.0f) * a_1.getFloat([email protected]_extraTension
                                                    , 1.5f);
     a_1.recycle();
 }
예제 #18
0
 /// <summary>Constructor used when an AlphaAnimation is loaded from a resource.</summary>
 /// <remarks>Constructor used when an AlphaAnimation is loaded from a resource.</remarks>
 /// <param name="context">Application context to use</param>
 /// <param name="attrs">Attribute set from which to read values</param>
 public AlphaAnimation(android.content.Context context, android.util.AttributeSet
                       attrs) : base(context, attrs)
 {
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.AlphaAnimation);
     mFromAlpha = a.getFloat([email protected]_fromAlpha, 1.0f
                             );
     mToAlpha = a.getFloat([email protected]_toAlpha, 1.0f);
     a.recycle();
 }
예제 #19
0
 /// <summary>Instantiates the ExpandedMenuView that is linked with the provided MenuBuilder.
 ///     </summary>
 /// <remarks>Instantiates the ExpandedMenuView that is linked with the provided MenuBuilder.
 ///     </remarks>
 /// <param name="menu">The model for the menu which this MenuView will display</param>
 public ExpandedMenuView(android.content.Context context, android.util.AttributeSet
                         attrs) : base(context, attrs)
 {
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.MenuView, 0, 0);
     mAnimations = a.getResourceId([email protected]_windowAnimationStyle
                                   , 0);
     a.recycle();
     setOnItemClickListener(this);
 }
예제 #20
0
 /// <summary>Initialize with standard view layout information and style.</summary>
 /// <remarks>
 /// Initialize with standard view layout information and style.
 /// Sets the base to the current time.
 /// </remarks>
 public Chronometer(android.content.Context context, android.util.AttributeSet attrs
                    , int defStyle) : base(context, attrs, defStyle)
 {
     mHandler = new _Handler_264(this);
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.Chronometer, defStyle, 0);
     setFormat(a.getString([email protected]_format));
     a.recycle();
     init();
 }
예제 #21
0
        /// <summary>
        /// Construct a new spinner with the given context's theme, the supplied attribute set,
        /// and default style.
        /// </summary>
        /// <remarks>
        /// Construct a new spinner with the given context's theme, the supplied attribute set,
        /// and default style. <code>mode</code> may be one of
        /// <see cref="MODE_DIALOG">MODE_DIALOG</see>
        /// or
        /// <see cref="MODE_DROPDOWN">MODE_DROPDOWN</see>
        /// and determines how the user will select choices from the spinner.
        /// </remarks>
        /// <param name="context">
        /// The Context the view is running in, through which it can
        /// access the current theme, resources, etc.
        /// </param>
        /// <param name="attrs">The attributes of the XML tag that is inflating the view.</param>
        /// <param name="defStyle">
        /// The default style to apply to this view. If 0, no style
        /// will be applied (beyond what is included in the theme). This may
        /// either be an attribute resource, whose value will be retrieved
        /// from the current theme, or an explicit style resource.
        /// </param>
        /// <param name="mode">Constant describing how the user will select choices from the spinner.
        ///     </param>
        /// <seealso cref="MODE_DIALOG">MODE_DIALOG</seealso>
        /// <seealso cref="MODE_DROPDOWN">MODE_DROPDOWN</seealso>
        public Spinner(android.content.Context context, android.util.AttributeSet attrs,
                       int defStyle, int mode) : base(context, attrs, defStyle)
        {
            // Only measure this many items to get a decent max width.
            android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                              .styleable.Spinner, defStyle, 0);
            if (mode == MODE_THEME)
            {
                mode = a.getInt([email protected]_spinnerMode, MODE_DIALOG);
            }
            switch (mode)
            {
            case MODE_DIALOG:
            {
                mPopup = new android.widget.Spinner.DialogPopup(this);
                break;
            }

            case MODE_DROPDOWN:
            {
                android.widget.Spinner.DropdownPopup popup = new android.widget.Spinner.DropdownPopup
                                                                 (this, context, attrs, defStyle);
                mDropDownWidth = a.getLayoutDimension([email protected]_dropDownWidth
                                                      , android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
                popup.setBackgroundDrawable(a.getDrawable([email protected]_popupBackground
                                                          ));
                int verticalOffset = a.getDimensionPixelOffset([email protected]_dropDownVerticalOffset
                                                               , 0);
                if (verticalOffset != 0)
                {
                    popup.setVerticalOffset(verticalOffset);
                }
                int horizontalOffset = a.getDimensionPixelOffset([email protected]_dropDownHorizontalOffset
                                                                 , 0);
                if (horizontalOffset != 0)
                {
                    popup.setHorizontalOffset(horizontalOffset);
                }
                mPopup = popup;
                break;
            }
            }
            mGravity = a.getInt([email protected]_gravity, android.view.Gravity
                                .CENTER);
            mPopup.setPromptText(java.lang.CharSequenceProxy.Wrap(a.getString([email protected]
                                                                              .styleable.Spinner_prompt)));
            a.recycle();
            // Base constructor can call setAdapter before we initialize mPopup.
            // Finish setting things up if this happened.
            if (mTempAdapter != null)
            {
                mPopup.setAdapter(mTempAdapter);
                mTempAdapter = null;
            }
        }
예제 #22
0
 /// <summary>Creates a new set of layout parameters.</summary>
 /// <remarks>
 /// Creates a new set of layout parameters. The values are extracted from
 /// the supplied attributes set and context. The XML attributes mapped
 /// to this set of layout parameters are:
 /// <ul>
 /// <li><code>layout_x</code>: the X location of the child</li>
 /// <li><code>layout_y</code>: the Y location of the child</li>
 /// <li>All the XML attributes from
 /// <see cref="android.view.ViewGroup.LayoutParams">android.view.ViewGroup.LayoutParams
 ///     </see>
 /// </li>
 /// </ul>
 /// </remarks>
 /// <param name="c">the application environment</param>
 /// <param name="attrs">
 /// the set of attributes from which to extract the layout
 /// parameters values
 /// </param>
 public LayoutParams(android.content.Context c, android.util.AttributeSet attrs) :
     base(c, attrs)
 {
     android.content.res.TypedArray a = c.obtainStyledAttributes(attrs, [email protected]
                                                                 .styleable.AbsoluteLayout_Layout);
     x = a.getDimensionPixelOffset([email protected]_Layout_layout_x
                                   , 0);
     y = a.getDimensionPixelOffset([email protected]_Layout_layout_y
                                   , 0);
     a.recycle();
 }
예제 #23
0
 protected override void setBaseAttributes(android.content.res.TypedArray arg0, int arg1, int arg2)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.widget.RadioGroup.LayoutParams._setBaseAttributes11717, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.widget.RadioGroup.LayoutParams.staticClass, global::android.widget.RadioGroup.LayoutParams._setBaseAttributes11717, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     }
 }
예제 #24
0
 /// <summary>Give back a previously retrieved StyledAttributes, for later re-use.</summary>
 /// <remarks>Give back a previously retrieved StyledAttributes, for later re-use.</remarks>
 public virtual void recycle()
 {
     lock (mResources.mTmpValue)
     {
         android.content.res.TypedArray cached = mResources.mCachedStyledAttributes;
         if (cached == null || cached.mData.Length < mData.Length)
         {
             mXml = null;
             mResources.mCachedStyledAttributes = this;
         }
     }
 }
예제 #25
0
 public ToggleButton(android.content.Context context, android.util.AttributeSet attrs
                     , int defStyle) : base(context, attrs, defStyle)
 {
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.ToggleButton, defStyle, 0);
     mTextOn        = a.getText([email protected]_textOn);
     mTextOff       = a.getText([email protected]_textOff);
     mDisabledAlpha = a.getFloat([email protected]_disabledAlpha
                                 , 0.5f);
     syncTextState();
     a.recycle();
 }
예제 #26
0
 protected override global::java.lang.Object onGetDefaultValue(android.content.res.TypedArray arg0, int arg1)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallObjectMethod(this.JvmHandle, global::android.preference.CheckBoxPreference._onGetDefaultValue6761, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1))) as java.lang.Object);
     }
     else
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::android.preference.CheckBoxPreference.staticClass, global::android.preference.CheckBoxPreference._onGetDefaultValue6761, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1))) as java.lang.Object);
     }
 }
예제 #27
0
        public override void inflate(android.content.res.Resources r, org.xmlpull.v1.XmlPullParser
                                     parser, android.util.AttributeSet attrs)
        {
            base.inflate(r, parser, attrs);
            android.content.res.TypedArray a = r.obtainAttributes(attrs, [email protected].
                                                                  styleable.ColorDrawable);
            int color = mState.mBaseColor;

            color             = a.getColor([email protected]_color, color);
            mState.mBaseColor = mState.mUseColor = color;
            a.recycle();
        }
 protected internal override void onConfigurationChanged(android.content.res.Configuration
                                                         newConfig)
 {
     base.onConfigurationChanged(newConfig);
     // Action bar can change size on configuration changes.
     // Reread the desired height from the theme-specified style.
     android.content.res.TypedArray a = getContext().obtainStyledAttributes(null, [email protected]
                                                                            .styleable.ActionBar, [email protected], 0);
     setContentHeight(a.getLayoutDimension([email protected]_height
                                           , 0));
     a.recycle();
 }
예제 #29
0
 /// <summary>Instantiates the IconMenuView that is linked with the provided MenuBuilder.
 ///     </summary>
 /// <remarks>Instantiates the IconMenuView that is linked with the provided MenuBuilder.
 ///     </remarks>
 public IconMenuView(android.content.Context context, android.util.AttributeSet attrs
                     ) : base(context, attrs)
 {
     android.content.res.TypedArray a = context.obtainStyledAttributes(attrs, [email protected]
                                                                       .styleable.IconMenuView, 0, 0);
     mRowHeight = a.getDimensionPixelSize([email protected]_rowHeight
                                          , 64);
     mMaxRows        = a.getInt([email protected]_maxRows, 2);
     mMaxItems       = a.getInt([email protected]_maxItems, 6);
     mMaxItemsPerRow = a.getInt([email protected]_maxItemsPerRow
                                , 3);
     mMoreIcon = a.getDrawable([email protected]_moreIcon);
     a.recycle();
     a = context.obtainStyledAttributes(attrs, [email protected],
                                        0, 0);
     mItemBackground = a.getDrawable([email protected]_itemBackground
                                     );
     mHorizontalDivider = a.getDrawable([email protected]_horizontalDivider
                                        );
     mHorizontalDividerRects = new java.util.ArrayList <android.graphics.Rect>();
     mVerticalDivider        = a.getDrawable([email protected]_verticalDivider
                                             );
     mVerticalDividerRects = new java.util.ArrayList <android.graphics.Rect>();
     mAnimations           = a.getResourceId([email protected]_windowAnimationStyle
                                             , 0);
     a.recycle();
     if (mHorizontalDivider != null)
     {
         mHorizontalDividerHeight = mHorizontalDivider.getIntrinsicHeight();
         // Make sure to have some height for the divider
         if (mHorizontalDividerHeight == -1)
         {
             mHorizontalDividerHeight = 1;
         }
     }
     if (mVerticalDivider != null)
     {
         mVerticalDividerWidth = mVerticalDivider.getIntrinsicWidth();
         // Make sure to have some width for the divider
         if (mVerticalDividerWidth == -1)
         {
             mVerticalDividerWidth = 1;
         }
     }
     mLayout = new int[mMaxRows];
     // This view will be drawing the dividers
     setWillNotDraw(false);
     // This is so we'll receive the MENU key in touch mode
     setFocusableInTouchMode(true);
     // This is so our children can still be arrow-key focused
     setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
 }
예제 #30
0
 protected internal override void setBaseAttributes(android.content.res.TypedArray
                                                    a, int widthAttr, int heightAttr)
 {
     this.width = MATCH_PARENT;
     if (a.hasValue(heightAttr))
     {
         this.height = a.getLayoutDimension(heightAttr, "layout_height");
     }
     else
     {
         this.height = WRAP_CONTENT;
     }
 }
예제 #31
0
		private android.content.res.TypedArray getCachedStyledAttributes(int len)
		{
			lock (mTmpValue)
			{
				android.content.res.TypedArray attrs = mCachedStyledAttributes;
				if (attrs != null)
				{
					mCachedStyledAttributes = null;
					attrs.mLength = len;
					int fullLen = len * android.content.res.AssetManager.STYLE_NUM_ENTRIES;
					if (attrs.mData.Length >= fullLen)
					{
						return attrs;
					}
					attrs.mData = new int[fullLen];
					attrs.mIndices = new int[1 + len];
					return attrs;
				}
				return new android.content.res.TypedArray(this, new int[len * android.content.res.AssetManager
					.STYLE_NUM_ENTRIES], new int[1 + len], len);
			}
		}
예제 #32
0
파일: Window.cs 프로젝트: skaslev/XobotOS
		/// <summary>
		/// Return the
		/// <see cref="android.R.styleable.Window">android.R.styleable.Window</see>
		/// attributes from this
		/// window's theme.
		/// </summary>
		public android.content.res.TypedArray getWindowStyle()
		{
			lock (this)
			{
				if (mWindowStyle == null)
				{
					mWindowStyle = mContext.obtainStyledAttributes([email protected]
						);
				}
				return mWindowStyle;
			}
		}