本文整理汇总了C#中ListView.SetY方法的典型用法代码示例。如果您正苦于以下问题:C# ListView.SetY方法的具体用法?C# ListView.SetY怎么用?C# ListView.SetY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListView
的用法示例。
在下文中一共展示了ListView.SetY方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle bundle)
{
this.Window.AddFlags(WindowManagerFlags.Fullscreen);
base.OnCreate(bundle);
SetContentView(Resource.Layout.MainView);
vm = this.ViewModel as MainViewModel;
vm.PropertyChanged += Vm_PropertyChanged;
loWallView = new WallView(this);
currentIndexLO = 0;
LinearLayout linearMainLayout = FindViewById<LinearLayout>(Resource.Id.left_drawer);
/*scrollIndice = new ScrollView (this);
scrollIndice.LayoutParameters = new ScrollView.LayoutParams (-1,400);
linearContentIndice = new LinearLayout (this);
linearContentIndice.LayoutParameters = new LinearLayout.LayoutParams (-1, 800);
linearContentIndice.Orientation = Orientation.Vertical;
linearContentIndice.SetBackgroundColor (Color.Red);
scrollIndice.AddView (linearContentIndice); */
var metrics = Resources.DisplayMetrics;
widthInDp = ((int)metrics.WidthPixels);
heightInDp = ((int)metrics.HeightPixels);
Configuration.setWidthPixel (widthInDp);
Configuration.setHeigthPixel (heightInDp);
task = new TaskView (this);
iniMenu ();
mToolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
SetSupportActionBar(mToolbar);
mToolbar.SetNavigationIcon (Resource.Drawable.hamburger);
mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
mLeftDrawer = FindViewById<LinearLayout>(Resource.Id.left_drawer);
mRightDrawer = FindViewById<LinearLayout>(Resource.Id.right_drawer);
mLeftDrawer.Tag = 0;
mRightDrawer.Tag = 1;
frameLayout = FindViewById<FrameLayout> (Resource.Id.content_frame);
main_ContentView = new RelativeLayout (this);
main_ContentView.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);
// main_ContentView.AddView (scrollIndice);
//main_ContentView.AddView(linearContentIndice);
LOContainerView LOContainer = new LOContainerView (this);
//main_ContentView.AddView (LOContainer);
//WallView wallview = new WallView(this);
//wallview.OpenLO.Click += Lo_ImagenLO_Click;
//lo.OpenTasks.Click += ListTasks_ItemClick;
//wallview.OpenChat.Click += imBtn_Chat_Click;
//wallview.OpenUnits.Click += imBtn_Units_Click;
loWallView.OpenChat.Click += imBtn_Chat_Click;
loWallView.OpenUnits.Click += imBtn_Units_Click;
main_ContentView.AddView (loWallView);
frameLayout.AddView (main_ContentView);
RelativeLayout RL = FindViewById<RelativeLayout> (Resource.Id.main_view_relativeLayoutCL);
Drawable dr = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/nubeactivity.png"), 768, 1024, true));
RL.SetBackgroundDrawable (dr);
dr = null;
//seting up chat view content
title_view = FindViewById<TextView> (Resource.Id.chat_view_title);
info1= FindViewById<TextView> (Resource.Id.chat_view_info1);
info2 = FindViewById<TextView> (Resource.Id.chat_view_info2);
title_list = FindViewById<TextView> (Resource.Id.chat_list_title);
mListViewChat = FindViewById<ListView> (Resource.Id.chat_list_view);
title_view.SetX (Configuration.getWidth(74));
title_view.SetY (Configuration.getHeight (202));
title_view.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
title_view.SetTypeface (null, TypefaceStyle.Bold);
info1.SetX (Configuration.getWidth (76));
info1.SetY (Configuration.getHeight (250));
//.........这里部分代码省略.........
示例2: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.allstatia);
myListView = FindViewById<ListView> (Resource.Id.listView1);
textbox = FindViewById<EditText> (Resource.Id.editText1);
textbox.Visibility = ViewStates.Invisible;
textbox.SetY (-210);
Search = FindViewById<Button> (Resource.Id.button1);
Search.SetY (-160);
Search.Click += Search_Click;
myListView.SetY (0);
var metrics = Resources.DisplayMetrics;
myListView.SetMinimumHeight (metrics.HeightPixels);
string IdStatya = Intent.GetStringExtra ("IdJournal");
NameStatya = new List<string> ();
Statya = new List<statya> ();
Statya = PrasingJournalJSON (IdStatya);
Themes = new List<string> ();
SectionName = new List<string> ();
foreach (statya ST in Statya) {
if (Themes == null) {
Themes.Add (ST.Section);
} else {
for (int i = 0; i < Themes.Count; i++) {
if (ST.Section == Themes [i]) {
sravn = true;
}
}
if (sravn == false) {
Themes.Add (ST.Section);
} else {
sravn = false;
}
}
}
string Section;
Section = null;
for (int i = 0; i < Statya.Count; i++) {
if (Section == Statya [i].Section) {
NameStatya.Add (Statya [i].ArticleTitle);
} else {
NameStatya.Add (Statya [i].Section);
NameStatya.Add (Statya [i].ArticleTitle);
Section = Statya [i].Section;
SectionName.Add (Statya [i].Section);
}
}
ArrayAdapter<String> adapter = new ArrayAdapter<string> (this, Resource.Layout.List_item, NameStatya);
myListView.Adapter = adapter;
myListView.ItemClick += MyListView_ItemClick;
}
示例3: ini
//.........这里部分代码省略.........
linearImageLO.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(372));
linearTextLO.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(250));
linearLike.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(120), Configuration.getHeight(80));
linearUsers.LayoutParameters = new LinearLayout.LayoutParams (-1,-2);
linearTextLO.Orientation = Orientation.Vertical;
linearTextLO.SetGravity(GravityFlags.Right);
linearLike.Orientation = Orientation.Vertical;
linearLike.SetGravity (GravityFlags.Center);
linearUsers.Orientation = Orientation.Horizontal;
linearUsers.SetGravity (GravityFlags.Center);
linearContainer.Orientation = Orientation.Vertical;
//linearContainer.SetGravity (GravityFlags.Center);
//Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("images/fondounidad.png"), 480, 640, true));
//linearImageLO.SetBackgroundDrawable (d);
imgHeart.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("images/like.png"), Configuration.getWidth(43), Configuration.getHeight(43), true));
txtAuthor.Text = "Author : David Spencer";
txtChapter.Text = "Flora y Fauna";
txtNameLO.Text = "Camino Inca";
txtLike.Text = "10";
//txtChapter.SetMaxWidth (Configuration.getWidth (580));
//txtChapter.Ellipsize = TextUtils.TruncateAt.End;
//txtChapter.SetMaxLines(1);
txtAuthor.SetTextColor (Color.ParseColor("#ffffff"));
txtChapter.SetTextColor (Color.ParseColor("#ffffff"));
txtNameLO.SetTextColor (Color.ParseColor("#ffffff"));
txtLike.SetTextColor (Color.ParseColor("#ffffff"));
txtNameLO.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
txtChapter.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (50));
txtAuthor.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
txtNameLO.Typeface = Typeface.DefaultBold;
txtAuthor.Gravity = GravityFlags.Right;
txtChapter.Gravity = GravityFlags.Right;
txtNameLO.Gravity = GravityFlags.Right;
txtLike.Gravity = GravityFlags.Center;
linearTextLO.AddView (txtNameLO);
linearTextLO.AddView (txtChapter);
linearTextLO.AddView (txtAuthor);
linearTextLO.SetPadding (0, 0, Configuration.getWidth (30), 0);
linearLike.AddView (imgHeart);
linearLike.AddView (txtLike);
_mCommentData = new List<CommentDataRow> ();
/*
_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
*/
// commentList.Adapter = new CommentListViewAdapter (context, _mCommentData);
commentList.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(654));
commentList.SetX (0);commentList.SetY (Configuration.getHeight (530));
linearTextLO.SetX (0); linearTextLO.SetY (Configuration.getHeight(200));
//linearImageLO.SetX (0); linearImageLO.SetY (0);
linearLike.SetX (0); linearLike.SetY (Configuration.getHeight(256));
linearContainer.SetX (0); linearContainer.SetY (0);
linearContainer.AddView (linearImageLO);
linearContainer.AddView (linearUsers);
mainLayout.AddView (linearContainer);
//mainLayout.AddView (linearImageLO);
mainLayout.AddView (linearTextLO);
mainLayout.AddView (linearLike);
mainLayout.AddView (commentList);
this.AddView (mainLayout);
/*linearImageLO.Click += delegate {
var com = ((LOViewModel)context.DataContext).SignUpCommand;
com.Execute(null);
};
*/
}
示例4: ini
public void ini(){
var textFormat = Android.Util.ComplexUnitType.Px;
mainLayout = new RelativeLayout (context);
mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/fondo.png"), 1024, 768, true));
mainLayout.SetBackgroundDrawable (d);
title = new TextView (context);
imgLinea = new ImageView (context);
listNotification = new ListView (context);
linearList = new LinearLayout (context);
imgPoint = new ImageView (context);
title.Text = "Notificaciones";
title.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
title.SetTextColor (Color.ParseColor ("#ffffff"));
title.SetTextSize (textFormat, Configuration.getHeight (48));
title.SetX (Configuration.getHeight (35));
title.SetY (Configuration.getWidth (142));
linearList.SetBackgroundColor (Color.ParseColor ("#ffffff"));
linearList.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (886));
linearList.SetX (Configuration.getWidth (0)); linearList.SetY (Configuration.getHeight(250));
listNotification.SetX (Configuration.getWidth (0)); listNotification.SetY (Configuration.getHeight(250));
listNotification.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight (886));
imgLinea.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/lineanotificaciones.png"), 4,2000 , true));
imgLinea.SetX (Configuration.getWidth (61)); imgLinea.SetY (Configuration.getHeight(240));
imgPoint.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/circblanco.png"), 30,30 , true));
imgPoint.SetX (Configuration.getWidth (52)); imgPoint.SetY (Configuration.getHeight(228));
//linearList.AddView (listNotification);
mainLayout.AddView (title);
mainLayout.AddView(linearList);
mainLayout.AddView (listNotification);
mainLayout.AddView (imgLinea);
mainLayout.AddView (imgPoint);
}