当前位置: 首页>>代码示例>>C#>>正文


C# IAttributeSet.GetAttributeValue方法代码示例

本文整理汇总了C#中IAttributeSet.GetAttributeValue方法的典型用法代码示例。如果您正苦于以下问题:C# IAttributeSet.GetAttributeValue方法的具体用法?C# IAttributeSet.GetAttributeValue怎么用?C# IAttributeSet.GetAttributeValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IAttributeSet的用法示例。


在下文中一共展示了IAttributeSet.GetAttributeValue方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MapViewLayoutParams

 public MapViewLayoutParams(Context context, IAttributeSet attrs)
     : base(context, attrs)
 {
     this.X = attrs.GetAttributeIntValue("http://schemas.mapquest.com/apk/res/mapquest", "x", int.MaxValue);
     this.Y = attrs.GetAttributeIntValue("http://schemas.mapquest.com/apk/res/mapquest", "x", int.MaxValue);
     String geoPoint = attrs.GetAttributeValue("http://schemas.mapquest.com/apk/res/mapquest", "geoPoint");
     if ((geoPoint.Length > 0))
     {
         String[] arr = geoPoint.Split(new[] { "," }, StringSplitOptions.None);
         if (arr.Length > 1)
         {
             try
             {
                 double latitude = Double.Parse(arr[0].Trim());
                 double longitude = Double.Parse(arr[1].Trim());
                 this.Point = new GeoPoint(latitude, longitude);
                 this.Mode = 0;
             }
             catch (NumberFormatException nfe)
             {
                 Log.Error("mq.android.maps.mapview", "Invalid value for geoPoint attribute : " + geoPoint);
             }
         }
     }
 }
开发者ID:knji,项目名称:mvvmcross.plugins,代码行数:25,代码来源:MapView.cs

示例2: DirectionArrow

        public DirectionArrow(Context context, IAttributeSet attrs)
            : base(context, attrs)
        {

            var dirAttr = attrs.GetAttributeValue(null, "direction");
            Enum.TryParse(dirAttr, out _dir);

            Create();
        }
开发者ID:tomgilder,项目名称:ReactiveTrader,代码行数:9,代码来源:DirectionArrow.cs

示例3: PriceButton

        public PriceButton(Context context, IAttributeSet attrs)
            : base(context, attrs)
        {
            LayoutInflater.From(context).Inflate(Resource.Layout.PriceButton, this);

            _bigFiguresTextView = FindViewById<TextView>(Resource.Id.PriceButtonBigFiguresTextView);
            _pipsTextView = FindViewById<TextView>(Resource.Id.PriceButtonPipsTextView);
            _tenthOfPipTextView = FindViewById<TextView>(Resource.Id.PriceButtonTenthOfPipTextView);
            _progressView = FindViewById<ProgressBar>(Resource.Id.PriceButtonProgress);
            _contentView = FindViewById<LinearLayout>(Resource.Id.PriceButtonContent);

            var directionLabelTextView = FindViewById<TextView>(Resource.Id.PriceButtonDirectionTextView);
            directionLabelTextView.Text = attrs.GetAttributeValue(null, "direction_label");

            Click += PriceButton_Click;
        }
开发者ID:tomgilder,项目名称:ReactiveTrader,代码行数:16,代码来源:PriceButton.cs

示例4: OnCreateView

        public global::Android.Views.View OnCreateView(string name, Context context, IAttributeSet attrs)
        {
            String viewFullName = string.Format("android.widget.{0}", name); // this is bad as it will only do the normal controls....
            var id = attrs.GetAttributeValue(BindingConstants.BindingNamespace, BindingConstants.IdString);

            var view = _layoutInflater.CreateView(viewFullName, null, attrs);

            if (view == null || id == null)
            {
                return view;
            }

            var node = FindNodeWithId(_rootnode, id);

            if (node != null)
            {
                BindingFactory bf = new BindingFactory();
                foreach (var property in node.Value.Properties)
                {
                    Add(view, property.Value, node.Value);
                }

            }
            return view;
        }
开发者ID:rhwilburn,项目名称:MVVM-for-Mono,代码行数:25,代码来源:PageBindingFactory.cs

示例5: LoadValuesFromXml

 private void LoadValuesFromXml(IAttributeSet attrs)
 {
     _title = attrs.GetAttributeValue(XmlNamespaceAndroid, "title");
     _units = attrs.GetAttributeValue(XmlNamespaceSessions, "units");
 }
开发者ID:pascalfr,项目名称:MPfm,代码行数:5,代码来源:SeekBarPreference.cs

示例6: ProcessAttributeSets

 void ProcessAttributeSets(IAttributeSet attrs)
 {
     var resID = attrs.GetAttributeResourceValue (null, "description", -1);
     var val = resID == -1 ?
         attrs.GetAttributeValue (null, "description")
         : Context.Resources.GetString (resID);
     desc = (val ?? string.Empty).ToUpper ();
 }
开发者ID:modulexcite,项目名称:bikr,代码行数:8,代码来源:CircleBadge.cs

示例7: Initialize

        void Initialize(IAttributeSet attrs = null)
        {
            maxValue = 127;

            if (attrs != null) {
                channel_name = attrs.GetAttributeValue ("http://schemas.android.com/apk/lib/QuMixDroid_Controls", "channel_name");
            }
        }
开发者ID:GeorgeWieggers,项目名称:QuMixDroid_xamarin,代码行数:8,代码来源:Fader.cs

示例8: SetValuesFromXml

        private void SetValuesFromXml(IAttributeSet attrs)
        {
            maxValue = attrs.GetAttributeIntValue (ANDROIDNS, "max", 100);
            minValue = attrs.GetAttributeIntValue (APPLICATIONNS, "min", 0);

            unitsLeft = GetAttributeStringValue (attrs, APPLICATIONNS, "unitsLeft", "");
            var units = GetAttributeStringValue (attrs, APPLICATIONNS, "units", "");
            unitsRight = GetAttributeStringValue (attrs, APPLICATIONNS, "unitsRight", units);

            var newInterval = attrs.GetAttributeValue (APPLICATIONNS, "interval");
            if (newInterval != null)
                int.TryParse (newInterval, out interval);
        }
开发者ID:JeffreyLau,项目名称:FiredTVLauncher,代码行数:13,代码来源:SeekBarPreference.cs

示例9: GetAttributeStringValue

        private string GetAttributeStringValue(IAttributeSet attrs, string nameSpace, string name, string defaultValue)
        {
            var value = attrs.GetAttributeValue (nameSpace, name);

            if (value == null)
                value = defaultValue;

            return value;
        }
开发者ID:JeffreyLau,项目名称:FiredTVLauncher,代码行数:9,代码来源:SeekBarPreference.cs

示例10: IonTextView

        public IonTextView(Context context, IAttributeSet attrs)
            : base(context, attrs)
        {
            this.context = context;

            for (int i = 0; i < attrs.AttributeCount; i++)
            {
                this.ttfName = attrs.GetAttributeValue("http://schemas.android.com/apk/res/com.gem.nwtbiblefree", "ttf");

                init();
            }
        }
开发者ID:PablusVinii,项目名称:SuperNWTBible,代码行数:12,代码来源:NWTCustomViews.cs

示例11: InsetTextView

 public InsetTextView(Context context, IAttributeSet attrs, int defStyle)
     : base(context, attrs, defStyle)
 {
     text = attrs.GetAttributeValue (null, "text");
     Initialize ();
 }
开发者ID:Andrea,项目名称:FriendTab,代码行数:6,代码来源:InsetTextView.cs


注:本文中的IAttributeSet.GetAttributeValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。