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


C# Card.SetText方法代码示例

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


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

示例1: OnCreate

		// The project requires the Google Glass Component from
		// https://components.xamarin.com/view/googleglass
		// so make sure you add that in to compile succesfully.
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Set our view from the GDK Card API
			var card = new Card (this);
			card.SetText ("Welcome to Xamarin Google Glass Development");
			card.SetFootnote ("Let's get hacking!");
			SetContentView (card.View);
		}
开发者ID:42Spikes,项目名称:F2S,代码行数:13,代码来源:MainActivity.cs

示例2: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var card = new Card(this);
            card.SetText("Xamarin on Glass is awesome");

            SetContentView(card.ToView());

        }
开发者ID:Vaikesh,项目名称:GoogleGlassDemoApp_Xamarin.Android,代码行数:10,代码来源:Activity1.cs

示例3: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var card = new Card(this);
            card.SetText("This is Bleu");
            card.SetFootnote("And I am relatively new");

            // this is purely for demo purposes
            var option = 3;
            switch (option)
            {
                case 0:
                {
                    card.SetImageLayout(Card.ImageLayout.Full);
                    card.AddImage(Resource.Drawable.bleu3);
                }
                break;
                
                case 1:
                {
                    card.SetImageLayout(Card.ImageLayout.Left);
                    card.AddImage(Resource.Drawable.bleu3);
                }
                break;
                
                case 2:
                {
                    card.SetImageLayout(Card.ImageLayout.Full);
                    card.AddImage(Resource.Drawable.bleu1);
                    card.AddImage(Resource.Drawable.bleu2);
                    card.AddImage(Resource.Drawable.bleu3);
                    card.AddImage(Resource.Drawable.bleu4);
                    card.AddImage(Resource.Drawable.bleu5);
                }
                break;
                
                case 3:
                {
                    card.SetImageLayout(Card.ImageLayout.Left);
                    card.AddImage(Resource.Drawable.bleu1);
                    card.AddImage(Resource.Drawable.bleu2);
                    card.AddImage(Resource.Drawable.bleu3);
                    card.AddImage(Resource.Drawable.bleu4);
                    card.AddImage(Resource.Drawable.bleu5);
                }
                break;
            }

            SetContentView(card.View);
        }
开发者ID:42Spikes,项目名称:F2S,代码行数:51,代码来源:MainActivity.cs

示例4: OnCreate

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            var intent = this.Intent;
            var b = intent.Extras;

            var imagePosition = b.GetInt("ImagePosition");
            if (imagePosition != -1)
            {
                var image = BingImagesActivity.BIS.Images[imagePosition];
                var card = new Card(this);
                card.SetText(image.Image.Copyright);
                SetContentView(card.View);
            }
        }
开发者ID:42Spikes,项目名称:F2S,代码行数:16,代码来源:BingImageDetailActivity.cs

示例5: createCards

        private List<Card> createCards(Context context)
        {
            var cards = new List<Card>();

            foreach (var image in MainActivity.Bing.Images)
            {
                var bmp =
                    Bitmap.CreateScaledBitmap(
                        Bitmap.CreateBitmap(BitmapFactory.DecodeByteArray(image.Data, 0, image.Data.Length)), 640, 480,
                        false);
                var card = new Card(context);
                //card.SetText("HI!");
                card.AddImage(bmp);
                card.SetText(image.Description);
                card.SetImageLayout(Card.ImageLayout.Full);
                cards.Add(card);
            }

            return cards;
        }
开发者ID:42Spikes,项目名称:F2S,代码行数:20,代码来源:BingImagesActivity.cs

示例6: MvxCard

        public MvxCard(Context ctx, CardViewModelInfo vmi, MvxViewModel viewModel) 
        {
            Card = new Card(ctx);
            ViewModel = viewModel;
            CardInfo = vmi;

            var inpc = viewModel as INotifyPropertyChanged;
            if (inpc != null)
            {
                inpc.PropertyChanged += inpc_PropertyChanged;
            }
            Card.SetText(CardInfo.getText(viewModel));
            Card.SetFootnote(CardInfo.getFooter(viewModel));

            var bkg = CardInfo.getBackgroundBytes(viewModel);
            if (bkg != null)
            {
                var bmp = BitmapFactory.DecodeByteArray(bkg, 0, bkg.Length);
                Card.AddImage(bmp);
                Card.SetImageLayout(Card.ImageLayout.Full);
            }
        }
开发者ID:42Spikes,项目名称:F2S,代码行数:22,代码来源:MvxCard.cs

示例7: OnCreate

		// The project requires the Google Glass Component from
		// https://components.xamarin.com/view/googleglass
		// so make sure you add that in to compile succesfully.
		protected override async void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			Window.AddFlags (WindowManagerFlags.KeepScreenOn);

			var scanner = new ZXing.Mobile.MobileBarcodeScanner(this);
			scanner.UseCustomOverlay = true;
			scanner.CustomOverlay = LayoutInflater.Inflate(Resource.Layout.QRScan, null);;
			var result = await scanner.Scan();

			AudioManager audio = (AudioManager) GetSystemService(Context.AudioService);
			audio.PlaySoundEffect((SoundEffect)Sounds.Success);

			Window.ClearFlags (WindowManagerFlags.KeepScreenOn);

			if (result != null) {
				Console.WriteLine ("Scanned Barcode: " + result.Text);
				var card2 = new Card (this);
				card2.SetText (result.Text);
				card2.SetFootnote ("Just scanned!");
				SetContentView (card2.ToView());
			}
		}
开发者ID:KingKumar,项目名称:Xamarin-Glass-QR-Scanner,代码行数:27,代码来源:MainActivity.cs


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