複数の列をサポートするC#Android Listviewを実行しようとしています。 私はここにリストビューを行うにはどのようにいくつかのコードが見つかりました:複数の列を持つAndroidリストビュー
// List view control
ListView list = (ListView) FindViewById(Resource.Id.mylist);
List<Dictionary<string, string>> mylist = new List<Dictionary<string, string>>();
Dictionary<string, string> map = new Dictionary<string, string>();
map.Add("Profit Centre", "Systems");
map.Add("Last Updated", "16/02/2012 15:34");
mylist.Add(map);
map = new Dictionary<string, string>();
map.Add("Profit Centre", "IDTS");
map.Add("Last Updated", "20/02/2012 10:26");
mylist.Add(map);
SimpleAdapter mSchedule = new SimpleAdapter(this, mylist, Resource.Layout.list_item,new String[] {"Profit Centre", "Lasted Updated",}, new int[] { Resource.Id.columnA, Resource.Id.columnB});
list.Adapter = mSchedule;
SimpleAdapterは、第二のパラメータが正しくないことを不平を言う: http://www.heikkitoivonen.net/blog/2009/02/15/multicolumn-listview-in-android/
しかし、これは次のように私はC#のにそれを変換するJavaコードです。これは、この
ERROR 1 =
最良のオーバーロードされたメソッドの「Android.Widget.SimpleAdapter.SimpleAdapter(Android.Content.Context、System.Collections.Generic.IList>の一致、int型、文字列[]を報告し、 INT [])」は、いくつかの無効な引数を持ってい
ERROR 2 =
引数2:から変換できません 'System.Collections.Generic.IList> '
' から' System.Collections.Generic.List>これはなぜですか?私はGoogleを使って、複数の列を持つリストビュー(Android用)を作成する方法があるのかどうかを調べていますが、JavaコードのみをC#で見つけることはできません。
おかげで、
アンドリュー・アシュクロフト
あなたはアンドロイドのためのC#を使用していますデベロ何か? – alykhalid
はい私はMonoDevelopを使用してC#でコードを開発しています – coolandy28