本文整理汇总了C#中Android.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# Android.GetString方法的具体用法?C# Android.GetString怎么用?C# Android.GetString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android
的用法示例。
在下文中一共展示了Android.GetString方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NewConnection
private Connection NewConnection(Android.Database.ICursor cursor)
{
var id = cursor.GetString (0);
var source =cursor.GetString (1);
Connection connection = new Connection (id, source);
return (connection);
}
示例2: GetStringForDay
private static string GetStringForDay (Android.Content.Context context, int day)
{
if (day == 1)
return context.GetString (Resource.String.bloom_time_begin);
else if (day > 27)
return context.GetString (Resource.String.bloom_time_end);
else
return context.GetString (Resource.String.bloom_time_middle);
}
示例3: MapScores
private Score MapScores(Android.Database.ICursor cursor)
{
Score scr = new Score ();
scr.ScoreID = cursor.GetInt (0);
scr.ScoreDate = cursor.GetString (1);
scr.PlayerName = cursor.GetString (2);
scr.ScoreNumber = cursor.GetInt (3);
return (scr);
}
示例4: NewStation
private Station NewStation(Android.Database.ICursor cursor)
{
var id = cursor.GetString (1);
var locationX = cursor.GetString (2);
var locationY = cursor.GetString (3);
var name = cursor.GetString (4);
var standardName = cursor.GetString (5);
Station station = new Station (id, locationX, locationY, name, standardName);
return station;
}
示例5: NewQuestion
private Question NewQuestion(Android.Database.ICursor cursor)
{
Question qst = new Question ();
qst.ImageID = cursor.GetInt (1);
qst.QuestionString = cursor.GetString (2);
qst.CorrectAnswer = cursor.GetString (3);
qst.WrongAnswer1 = cursor.GetString (4);
qst.WrongAnswer2 = cursor.GetString (5);
qst.WrongAnswer3 = cursor.GetString (6);
return (qst);
}
示例6: GetContactInfoFromCursor
private ContactInfo GetContactInfoFromCursor(Android.Database.ICursor cursor)
{
var displayName = cursor.GetString(cursor.GetColumnIndex(projection[1]));
var nameParts = displayName.Split(' ');
var lastName = nameParts.Length > 1 ? nameParts[1] : null;
return new ContactInfo()
{
Id = cursor.GetString(cursor.GetColumnIndex(ContactsContract.ContactsColumns.LookupKey)),
GivenName = nameParts[0],
AdditionalName = null,
FamilyName = lastName
};
}
示例7: ClinicalPollutionToString
public static string ClinicalPollutionToString(Android.Content.Context context, int pollution)
{
switch (pollution)
{
case 1:
return context.GetString(Resource.String.clinical_pollution_low);
case 2:
return context.GetString(Resource.String.clinical_pollution_intermediate);
case 3:
return context.GetString(Resource.String.clinical_pollution_high);
case 4:
return context.GetString(Resource.String.clinical_pollution_veryhigh);
}
return "Unknown";
}
示例8: NewTweet
private Tweet NewTweet(Android.Database.ICursor cursor)
{
var j = JsonValue.Parse (cursor.GetString (1));
Tweet twt = new Tweet (j);
return (twt);
}
示例9: BloomTimeToString
public static string BloomTimeToString (Android.Content.Context context, DateTime bloomStart, DateTime bloomEnd)
{
var start = GetStringForDay (context, bloomStart.Day);
var end = GetStringForDay (context, bloomEnd.Day);
var result = start + " " + bloomStart.ToString ("MMMMM") + " " + context.GetString (Resource.String.bloom_time_until) + " " + end + " " + bloomEnd.ToString ("MMMM");
return result;
}
示例10: NewView
public override View NewView (Context context, Android.Database.ICursor cursor, ViewGroup parent)
{
LayoutInflater inflater = LayoutInflater.From (context);
TextView view = (TextView) inflater.Inflate (
Android.Resource.Layout.SimpleDropDownItem1Line, parent, false);
view.Text = cursor.GetString (COLUMN_DISPLAY_NAME);
return view;
}
示例11: MapScores
private Score MapScores(Android.Database.ICursor cursor)
{
Score scr = new Score();
scr.ScoreID = cursor.GetInt(0);
scr.ScoreDate = cursor.GetString(1);
scr.ScoreNumber = cursor.GetInt(2);
scr.Rating = cursor.GetDouble(3);
scr.Slope = cursor.GetInt(4);
return (scr);
}
示例12: BindView
public override void BindView (View view, Context context, Android.Database.ICursor cursor)
{
((TextView) view).Text = cursor.GetString (COLUMN_DISPLAY_NAME);
}
示例13: populateListFromDB
private void populateListFromDB(Android.Database.ICursor sqldb_cursor)
{
if (sqldb_cursor != null)
{
sqldb_cursor.MoveToFirst();
do {
var itm = new TableItem {
Id = sqldb_cursor.GetString(0),
Heading = sqldb_cursor.GetString(1) ,
SubHeading = sqldb_cursor.GetString(2),
DownloadUrl = sqldb_cursor.GetString(3),
ImageName = sqldb_cursor.GetString(4)
};
items.Add (itm);
} while (sqldb_cursor.MoveToNext());
}
progress.Dismiss();
ListAdapter = new HomeScreenAdapter(this, items);
ListView.FastScrollEnabled = true;
}