本文整理汇总了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);
}
示例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());
}
示例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);
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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());
}
}