本文整理汇总了C#中LinearLayout.SetBackgroundColor方法的典型用法代码示例。如果您正苦于以下问题:C# LinearLayout.SetBackgroundColor方法的具体用法?C# LinearLayout.SetBackgroundColor怎么用?C# LinearLayout.SetBackgroundColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LinearLayout
的用法示例。
在下文中一共展示了LinearLayout.SetBackgroundColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
void Initialize ()
{
this.LayoutParameters = new RelativeLayout.LayoutParams(-1,Configuration.getHeight (412));// LinearLayout.LayoutParams (Configuration.getWidth (582), Configuration.getHeight (394));
this.SetGravity(GravityFlags.Center);
image = new RelativeLayout(context);
txtDescription = new TextView (context);
txtTitle = new TextView (context);
background = new LinearLayout (context);
image.SetGravity (GravityFlags.Center);
background.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (530), Configuration.getHeight (356));
background.Orientation = Orientation.Vertical;
background.SetBackgroundColor (Color.ParseColor ("#50000000"));
image.LayoutParameters = new RelativeLayout.LayoutParams (Configuration.getWidth (582), Configuration.getHeight (394));
txtTitle.SetTextColor (Color.ParseColor("#ffffff"));
txtDescription.SetTextColor(Color.ParseColor("#ffffff"));
txtTitle.SetTextSize (ComplexUnitType.Px, Configuration.getHeight (40));
txtDescription.SetTextSize (ComplexUnitType.Px, Configuration.getHeight (30));
background.AddView (txtTitle);
background.AddView (txtDescription);
image.AddView (background);
this.AddView (image);
//this.AddView (background);
}
示例2: OnCreateDialogView
protected override View OnCreateDialogView()
{
var layout = new LinearLayout(_context) {Orientation = Orientation.Vertical};
layout.SetPadding(10, 10, 10, 10);
layout.SetBackgroundColor(Color.Black);
_serverUrl = new TextView(_context) {Text = "Server url:"};
_serverUrl.SetTextColor(Color.White);
_serverUrl.SetPadding(0, 8, 0, 3);
_serverUrlBox = new EditText(_context);
_serverUrlBox.SetSingleLine(true);
_userKey = new TextView(_context) {Text = "User key:"};
_userKey.SetTextColor(Color.White);
_userKeyBox = new EditText(_context);
_userKeyBox.SetSingleLine(true);
layout.AddView(_serverUrl);
layout.AddView(_serverUrlBox);
layout.AddView(_userKey);
layout.AddView(_userKeyBox);
return layout;
}
示例3: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
// Use this to return your custom view for this Fragment
// return inflater.Inflate(Resource.Layout.YourFragment, container, false);
//return base.OnCreateView (inflater, container, savedInstanceState);
linLayout = viewResource.LinLayout (this.Activity);
//linLayout.Id = 1;
txtViewTitle = viewResource.TextViewTitle (this.Activity);
txtViewTitle.SetPadding (10, 10, 10, 10);
button = viewResource.BtnOne (this.Activity);
button.Click += OnButtonClick;
button.Text = "Click me!";
buttonTwo = viewResource.BtnTwo (this.Activity);
txtViewTwo = viewResource.TextViewOne(this.Activity);
txtViewTwo.Text = "Click the button!";
subLayout = viewResource.SubLinLayout (this.Activity);
subLayout.AddView (txtViewTwo);
subLayout.AddView (button);
subLayout.AddView (buttonTwo);
linLayout.AddView (subLayout);
linLayout.SetBackgroundColor (Android.Graphics.Color.BlueViolet);
return linLayout;
}
示例4: Initialize
void Initialize ()
{
this.LayoutParameters = new RelativeLayout.LayoutParams(-1,Configuration.getHeight (412));// LinearLayout.LayoutParams (Configuration.getWidth (582), Configuration.getHeight (394));
this.SetGravity(GravityFlags.Center);
image = new RelativeLayout(context);
txtTitle = new TextView (context);
background = new LinearLayout (context);
linearTitle = new LinearLayout (context);
linearButton = new LinearLayout (context);
imgPlay = new ImageButton (context);
video = new VideoView (context);
image.SetGravity (GravityFlags.Bottom);
background.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (582), Configuration.getHeight (111));
background.Orientation = Orientation.Horizontal;
background.SetBackgroundColor (Color.ParseColor ("#50000000"));
linearTitle.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (482), Configuration.getHeight (111));
linearTitle.Orientation = Orientation.Horizontal;
linearTitle.SetGravity (GravityFlags.Center);
linearButton.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (100), Configuration.getHeight (111));
linearButton.Orientation = Orientation.Horizontal;
linearButton.SetGravity (GravityFlags.Center);
image.LayoutParameters = new RelativeLayout.LayoutParams (Configuration.getWidth (582), Configuration.getHeight (394));
//image.SetGravity (GravityFlags.Bottom);
video.LayoutParameters = new ViewGroup.LayoutParams(Configuration.getWidth(582),Configuration.getHeight(394));
imgPlay.Alpha = 255.0f;
imgPlay.SetBackgroundColor (Color.Transparent);
txtTitle.SetTextColor (Color.ParseColor("#ffffff"));
txtTitle.SetPadding (Configuration.getWidth (20), 0, 0, 0);
txtTitle.SetTextSize (ComplexUnitType.Px, Configuration.getHeight (40));
txtTitle.Ellipsize = Android.Text.TextUtils.TruncateAt.End;
txtTitle.SetMaxLines (2);
//imgPlay.SetImageBitmap (Bitmap.CreateStxtcaledBitmap (getBitmapFromAsset ("icons/"), Configuration.getWidth (83), Configuration.getHeight (83), true));
linearTitle.AddView (txtTitle);
linearButton.AddView (imgPlay);
background.AddView (linearTitle);
background.AddView (linearButton);
image.AddView (background);
this.AddView (image);
//this.AddView (background);
}
示例5: MyTooltip
public MyTooltip(FlexPie pie, Context context)
: base(pie)
{
txtLabel = new TextView(context);
LinearLayout layout = new LinearLayout(context);
layout.Orientation = Orientation.Vertical;
layout.SetBackgroundColor(Android.Graphics.Color.Gray);
layout.SetPadding(5, 5, 5, 5);
layout.AddView(txtLabel);
AddView(layout);
}
示例6: GetSampleContent
public override View GetSampleContent (Context con)
{
LinearLayout linear = new LinearLayout(con);
linear.SetBackgroundColor(Color.White);
linear.Orientation = Orientation.Vertical;
linear.SetPadding(10, 10, 10, 10);
TextView text1 = new TextView(con);
text1.TextSize = 16;
text1.SetTextColor(Color.ParseColor("#262626"));
text1.Typeface = Typeface.DefaultBold;
text1.Text = "Allowed Characters";
text1.SetPadding(5, 10, 10, 5);
linear.AddView(text1);
TextView text2 = new TextView(con);
text2.TextSize = 14;
text2.SetTextColor(Color.ParseColor("#3F3F3F"));
text2.Text = "All 128 ASCII Characters";
text2.SetPadding(5, 5, 5, 5);
LinearLayout text2Layout = new LinearLayout(con);
LinearLayout.LayoutParams parms = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.WrapContent);
text2Layout.LayoutParameters = parms;
text2Layout.AddView(text2);
linear.AddView(text2Layout);
LinearLayout barcodeLayout = new LinearLayout(con);
barcodeLayout.SetPadding(0, 10, 0, 5);
LinearLayout.LayoutParams parms1 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.WrapContent);
barcodeLayout.LayoutParameters = parms1;
barcode = new SfBarcode(con);
barcode.Text = "G71C0453";
Typeface fontFamily = Typeface.Create("helvetica", TypefaceStyle.Bold);
barcode.TextFont = fontFamily;
barcode.SetBackgroundColor(Color.ParseColor("#F2F2F2"));
barcode.Symbology = BarcodeSymbolType.Code39Extended;
barcode.TextSize = 20;
Code39ExtendedSettings setting = new Code39ExtendedSettings();
setting.BarHeight = 120;
setting.NarrowBarWidth = 3;
barcode.SymbologySettings = setting;
barcodeLayout.AddView(barcode);
linear.AddView(barcodeLayout);
return linear;
}
示例7: GetSampleContent
public override View GetSampleContent (Context con)
{
LinearLayout linear = new LinearLayout(con);
linear.SetBackgroundColor(Color.White);
linear.Orientation = Orientation.Vertical;
linear.SetPadding(10, 10, 10, 10);
TextView text1 = new TextView(con);
text1.TextSize = 16;
text1.SetTextColor(Color.ParseColor("#262626"));
text1.Typeface = Typeface.DefaultBold;
text1.Text = "Allowed Characters";
text1.SetPadding(5, 10, 10, 5);
linear.AddView(text1);
TextView text2 = new TextView(con);
text2.TextSize = 14;
text2.SetTextColor(Color.ParseColor("#3F3F3F"));
text2.Text = "ASCII values from 32 to 127\nSPACE ! \" # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ]^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ DEL";
text2.SetPadding(5, 5, 5, 5);
LinearLayout text2Layout = new LinearLayout(con);
LinearLayout.LayoutParams parms = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.WrapContent);
text2Layout.LayoutParameters = parms;
text2Layout.AddView(text2);
linear.AddView(text2Layout);
LinearLayout barcodeLayout = new LinearLayout(con);
barcodeLayout.SetPadding(0, 10, 0, 5);
LinearLayout.LayoutParams parms1 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.WrapContent);
barcodeLayout.LayoutParameters = parms1;
barcode = new SfBarcode(con);
barcode.Text = "ISBN-678504";
Typeface fontFamily = Typeface.Create("helvetica", TypefaceStyle.Bold);
barcode.TextFont = fontFamily;
barcode.SetBackgroundColor(Color.ParseColor("#F2F2F2"));
barcode.Symbology = BarcodeSymbolType.Code128B;
barcode.TextSize = 20;
Code128BSettings setting = new Code128BSettings();
setting.BarHeight = 120;
setting.NarrowBarWidth = 3;
barcode.SymbologySettings = setting;
barcodeLayout.AddView(barcode);
linear.AddView(barcodeLayout);
return linear;
}
示例8: GetSampleContent
public override View GetSampleContent (Context con)
{
LinearLayout linear = new LinearLayout(con);
linear.SetBackgroundColor(Color.White);
linear.Orientation = Orientation.Vertical;
linear.SetPadding(10, 10, 10, 10);
TextView text1 = new TextView(con);
text1.TextSize = 16;
text1.SetTextColor(Color.ParseColor("#262626"));
text1.Typeface = Typeface.DefaultBold;
text1.Text = "Allowed Characters";
text1.SetPadding(5, 10, 10, 5);
linear.AddView(text1);
TextView text2 = new TextView(con);
text2.TextSize = 14;
text2.SetTextColor(Color.ParseColor("#3F3F3F"));
text2.Text = "ASCII values from 0 to 95\nNUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US SPACE ! \" # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ]^ _";
text2.SetPadding(5, 5, 5, 5);
LinearLayout text2Layout = new LinearLayout(con);
LinearLayout.LayoutParams parms = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.WrapContent);
text2Layout.LayoutParameters = parms;
text2Layout.AddView(text2);
linear.AddView(text2Layout);
LinearLayout barcodeLayout = new LinearLayout(con);
barcodeLayout.SetPadding(0, 10, 0, 5);
LinearLayout.LayoutParams parms1 = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.WrapContent);
barcodeLayout.LayoutParameters = parms1;
barcode = new SfBarcode(con);
barcode.Text = "ACL32 SF-D8";
Typeface fontFamily = Typeface.Create("helvetica", TypefaceStyle.Bold);
barcode.TextFont = fontFamily;
barcode.SetBackgroundColor(Color.ParseColor("#F2F2F2"));
barcode.Symbology = BarcodeSymbolType.Code128A;
barcode.TextSize = 20;
Code128ASettings setting = new Code128ASettings();
setting.BarHeight = 120;
setting.NarrowBarWidth = 3;
barcode.SymbologySettings = setting;
barcodeLayout.AddView(barcode);
linear.AddView(barcodeLayout);
return linear;
}
示例9: OnCreate
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.PublicAcivity);
ColorDrawable colorDrawable = new ColorDrawable (Color.ParseColor (Helpers.ColorHeader));
ActionBar.SetBackgroundDrawable (colorDrawable);
WebView = FindViewById<WebView> (Resource.Id.Webview);
ProGWebview = FindViewById<ProgressBar> (Resource.Id.ProGWebview);
PrgBViews = FindViewById<ProgressBar> (Resource.Id.PrgBViews);
LnYNext = FindViewById<LinearLayout> (Resource.Id.LnYNext);
LnYNext.SetBackgroundColor (Color.ParseColor (Helpers.ColorHeader));
imageButton1 = FindViewById<ImageButton> (Resource.Id.imageButton1);
imageButton2 = FindViewById<ImageButton> (Resource.Id.imageButton2);
imageButton3 = FindViewById<ImageButton> (Resource.Id.imageButton3);
imageButton4 = FindViewById<ImageButton> (Resource.Id.imageButton4);
imageButton5 = FindViewById<ImageButton> (Resource.Id.imageButton5);
TxtPuntosR=FindViewById<TextView>(Resource.Id.TxtPuntosR);
TxtPuntosRR=FindViewById<TextView>(Resource.Id.TxtPuntosRR);
PrgBViews.Max = 6;
WebView.Settings.JavaScriptEnabled = true;
WebView.Settings.LoadsImagesAutomatically = true;
WebView.SetWebViewClient (new BulletinWebViewClient (this, ProGWebview));
imageButton1.Click+= (sender, e) => ValidaControl((ImageButton)sender);
imageButton2.Click+= (sender, e) => ValidaControl((ImageButton)sender);
imageButton3.Click+= (sender, e) => ValidaControl((ImageButton)sender);
imageButton4.Click+= (sender, e) => ValidaControl((ImageButton)sender);
imageButton5.Click+= (sender, e) => ValidaControl((ImageButton)sender);
var telephonyManager = (TelephonyManager) GetSystemService(TelephonyService);
Imei = telephonyManager.DeviceId;
DatoUser = GetUserDatos ();
}
示例10: GetSampleContent
public override View GetSampleContent (Context con)
{
int height = con.Resources.DisplayMetrics.HeightPixels/2;
LinearLayout linearLayout = new LinearLayout(con);
linearLayout.SetGravity (Android.Views.GravityFlags.CenterHorizontal);
linearLayout.Orientation = Android.Widget.Orientation.Vertical;
linearLayout.SetBackgroundColor(Color.White);
img = new ImageView(con);
img.SetImageResource (Resource.Drawable.mount);
linearLayout.LayoutParameters = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
linearLayout.SetPadding(20, 20, 20, 20);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, (int)(height+(height/3.5)),GravityFlags.Center);
img.SetPadding(12, 0, 10, 0);
img.LayoutParameters = (layoutParams);
range=new SfRangeSlider(con);
range.Minimum = 0;range.Maximum = 100; range.Value = 100;
range.ShowRange = false; range.SnapsTo = SnapsTo.None;
range.Orientation = Com.Syncfusion.Sfrangeslider.Orientation.Horizontal;
range.TickPlacement = TickPlacement.BottomRight;
range.ShowValueLabel = true; range.TickFrequency = 20;
range.ValuePlacement = ValuePlacement.BottomRight;
range.LayoutParameters = (new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MatchParent, 150));
range.ValueChanged += ValueChanged ;
linearLayout.AddView(img);
TextView text1 = new TextView(con);
text1.Text = " Opacity";
text1.TextSize=20;
text1.Gravity = GravityFlags.Left;
range.SetY(-30);
linearLayout.AddView(text1);
linearLayout.AddView(range);
FrameLayout frame = new FrameLayout(con);
frame.SetBackgroundColor (Color.White);
frame.LayoutParameters = ( new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent,GravityFlags.Center));
frame.AddView(linearLayout);
return frame;
}
示例11: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
// Use this to return your custom view for this Fragment
//return base.OnCreateView (inflater, container, savedInstanceState);
lLayout = viewResource.LinLayout(this.Activity);
txtViewTitle = viewResource.TextViewTitle (this.Activity);
txtViewTitle.Text = "Welcome to my Clicking App";
txtViewCountMsg = viewResource.TextViewOne (this.Activity);
txtViewCountMsg.Text = String.Format ("You have clicked {0} many times", _count);
lLayout.AddView (txtViewTitle);
lLayout.AddView (txtViewCountMsg);
lLayout.SetBackgroundColor (Android.Graphics.Color.Aquamarine);
return lLayout;
}
示例12: initHeaderBar
private LinearLayout initHeaderBar(string title)
{
LinearLayout barlayout = new LinearLayout (this.context);
LinearLayout.LayoutParams blp = new LinearLayout.LayoutParams (ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.WrapContent, 0.0F);
barlayout.LayoutParameters = blp;
barlayout.SetGravity (GravityFlags.CenterHorizontal | GravityFlags.CenterVertical);
barlayout.SetBackgroundColor (Color.Black);
TextView text = new TextView (this.context);
if (!title.Equals ("undefined")) {
text.Text = title;
}
text.SetTextColor (Color.White);
text.Gravity = GravityFlags.CenterHorizontal | GravityFlags.CenterVertical;
text.TextSize = 20F;
text.LayoutParameters = new LinearLayout.LayoutParams (ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent, 1.0F);
barlayout.AddView (text);
return barlayout;
}
示例13: BaseMapSectionMenuItem
public BaseMapSectionMenuItem(Context context)
: base(context)
{
Orientation = Orientation.Vertical;
this.context = context;
int width = (int)(Metrics.WidthPixels * 0.9);
headerContainer = new LinearLayout(context);
headerContainer.SetBackgroundColor(Colors.ActionBar);
headerContainer.Orientation = Orientation.Horizontal;
AddView(headerContainer);
contentContainer = new RelativeLayout(context);
contentContainer.LayoutParameters = new RelativeLayout.LayoutParams(width, 100);
//contentContainer.Orientation = Orientation.Horizontal;
AddView(contentContainer);
osmLabel = GetHeaderItem(TypefaceStyle.Bold);
separatorLabel = GetHeaderItem(TypefaceStyle.Bold);
separatorLabel.Gravity = Android.Views.GravityFlags.Center;
tileTypeLabel = GetHeaderItem(TypefaceStyle.Normal);
headerContainer.AddView(osmLabel);
headerContainer.AddView(separatorLabel);
headerContainer.AddView(tileTypeLabel);
var parameters = new LinearLayout.LayoutParams(width, LayoutParams.WrapContent, 0.8f);
parameters.LeftMargin = Padding;
parameters.RightMargin = Padding;
parameters.TopMargin = Padding;
LayoutParameters = parameters;
}
示例14: OnCreate
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.Steady);
//set level
int currentlevel = GetPrefs ("currentlevel");
//display level
TextView levelText = (TextView)FindViewById(Resource.Id.level);
levelText.Text = "Level " + Java.Lang.String.ValueOf (currentlevel);
//set up accelerometer
_sensorManager = (SensorManager) GetSystemService(Context.SensorService);
_sensorTextView = FindViewById<TextView>(Resource.Id.data);
mainLayout = (LinearLayout)FindViewById(Resource.Id.linearLayout1);
mainLayout.SetBackgroundColor(Android.Graphics.Color.Red);
green = false;
checkPass ();
}
示例15: ini
public void ini(){
Drawable dr = new BitmapDrawable (getBitmapFromAsset("images/1header.png"));
header = new LinearLayout(context);
header.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(125));
header.Orientation = Orientation.Horizontal;
header.SetGravity (GravityFlags.Center);
header.SetBackgroundDrawable (dr);
titulo_header = new TextView (context);
titulo_header.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(550), -1);
titulo_header.SetTextSize (ComplexUnitType.Fraction, Configuration.getHeight(38));
titulo_header.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");
titulo_header.SetTextColor (Color.White);
titulo_header.Gravity = GravityFlags.Center;
//titulo_header.TextAlignment = TextAlignment.Center;
placesInfoLayout = new LinearLayout (context);
placesInfoLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
int space = Configuration.getWidth (30);
placesInfoLayout.SetPadding(space,space,space,space);
placesInfoLayout.Orientation = Orientation.Vertical;
_mainLayout = new RelativeLayout (context);
_mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
_mainLayout.AddView (header);
mapImage = new ScaleImageView (context, null);
mapImage.LayoutParameters = new LinearLayout.LayoutParams (-1, -1);
mapSpace = new LinearLayout (context);
mapSpace.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(640), Configuration.getWidth(640));
mapSpace.SetY (Configuration.getHeight (125));
mapSpace.SetGravity (GravityFlags.Left);
mapSpace.SetBackgroundColor (Color.ParseColor ("#DFC6BB"));
//HUILLCA-----------------------------------------
mapSpaceMarker = new RelativeLayout (context);
mapSpaceMarker.LayoutParameters = new RelativeLayout.LayoutParams (Configuration.getWidth(640), Configuration.getWidth(640));
mapSpaceMarker.SetY (Configuration.getHeight (125));
mapSpaceMarker.SetGravity (GravityFlags.Left);
mapSpaceMarker.SetBackgroundColor (Color.Transparent);
iconMarker = new ImageIconMap (context);
iconMarker.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (60), Configuration.getWidth (60));
int w = Configuration.getWidth (70);
int h = Configuration.getWidth (70);
iconMarker.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/iconmap12.png"), w, h, true));
iconMarker.SetX (-100);
iconMarker.SetY (-100);
mapSpaceMarker.AddView (iconMarker);
var fadeIn = new AlphaAnimation(0, 1);
fadeIn.Interpolator = new AccelerateInterpolator();
fadeIn.Duration = 1000;
fadeOut = new AlphaAnimation(1, 0);
fadeOut.Interpolator = new DecelerateInterpolator();
fadeOut.Duration = 3000;
fadeOut.AnimationEnd += (s, e) =>
{
/*ThreadPool.QueueUserWorkItem(state =>
{
Thread.Sleep(2000); //wait 2 sec
//RunOnUiThread(() => iconMarker.StartAnimation(fadeOut));
});*/
iconMarker.StartAnimation(fadeIn);
iconMarker.Visibility = ViewStates.Invisible;
};
//-------------------------------------------------------
mapSpace.AddView (mapImage);
placeSpace = new VerticalScrollView (context);
placeSpace.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(375-85));
placeSpace.SetY (Configuration.getHeight (125)+Configuration.getWidth(640));
placeSpace.SetBackgroundColor (Color.White);
placesContainer = new LinearLayout (context);
placesContainer.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(375-85));
placesContainer.Orientation = Orientation.Vertical;
_mainLayout.AddView (mapSpace);
_mainLayout.AddView (mapSpaceMarker);//HUILLCA
_mainLayout.AddView (placeSpace);
_publicidadLayout = new LinearLayout (context);
_publicidadLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (85));
Drawable drp = new BitmapDrawable (getBitmapFromAsset ("images/footerad.jpg"));
_publicidadLayout.SetBackgroundDrawable (drp);
_publicidadLayout.SetY (Configuration.getHeight(1136-85));
_mainLayout.AddView (_publicidadLayout);
_publicidadLayout.Click += delegate {
if (adOpen) {
hideAd ();
} else {
//.........这里部分代码省略.........