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


C# ListView.SetMinimumHeight方法代码示例

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


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

示例1: 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;
        }
开发者ID:baitun,项目名称:BGUEP-Journal,代码行数:53,代码来源:statia.cs

示例2: setupDrinksListView

 void setupDrinksListView(View view)
 {
     drinksListView = view.FindViewById<ListView>(Resource.Id.DrinkList);
     drinksListView.ItemClick += haveDrink;
     drinksListView.ItemLongClick += showAboutDrinkAlert;
     drinksListView.SetMinimumHeight(100);
     var inflater = Application.Context.GetSystemService(Context.LayoutInflaterService) as LayoutInflater;
     var footerLayout = inflater.Inflate(Resource.Layout.DrinksListFooter, null);
     setupNewDrinkButton(footerLayout);
     drinksListView.AddFooterView(footerLayout);
 }
开发者ID:Armoken,项目名称:Learning,代码行数:11,代码来源:TabFragments.cs


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