本文整理汇总了C#中Card.AddImage方法的典型用法代码示例。如果您正苦于以下问题:C# Card.AddImage方法的具体用法?C# Card.AddImage怎么用?C# Card.AddImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Card
的用法示例。
在下文中一共展示了Card.AddImage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getImagesCard
private Card getImagesCard(Context context)
{
var card = new Card(context);
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);
//card.AddImage(Resource.Drawable.bleu5);
return card;
}
示例2: 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;
}
示例3: 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);
}
}
示例4: 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);
}