本文整理汇总了C#中Android.Widget.TextView.Append方法的典型用法代码示例。如果您正苦于以下问题:C# TextView.Append方法的具体用法?C# TextView.Append怎么用?C# TextView.Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Widget.TextView
的用法示例。
在下文中一共展示了TextView.Append方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
// [END mListener_variable_reference]
// [START auth_oncreate_setup_beginning]
protected override void OnCreate (Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);
// Put application specific code here.
// [END auth_oncreate_setup_beginning]
SetContentView (Resource.Layout.activity_main);
logView = FindViewById<TextView> (Resource.Id.sample_logview);
logView.SetTextAppearance (this, Resource.Style.Log);
logView.SetBackgroundColor (Android.Graphics.Color.White);
logView.Append ("\r\n");
// [START auth_oncreate_setup_ending]
if (savedInstanceState != null)
authInProgress = savedInstanceState.GetBoolean (AUTH_PENDING);
buildFitnessClient();
}
示例2: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
#region Configure Activity Controls
var layout = new LinearLayout(this);
layout.Orientation = Orientation.Vertical;
var chatMessagesLabel = new TextView(this);
chatMessagesLabel.Text = "Chat Messages";
/// <summary>
/// The text view in which the chat messages are displayed
/// </summary>
var chatTextView = new TextView(this);
var chatInputLabel = new TextView(this);
chatInputLabel.Text = "Enter the text to chat here";
/// <summary>
/// The text view which is the chat message to be broadcast
/// </summary>
var chatInput = new EditText(this);
/// <summary>
/// The button that sends the chat message
/// </summary>
var chatButton = new Button(this);
chatButton.Text = "Chat";
layout.AddView(chatInputLabel);
layout.AddView(chatInput);
layout.AddView(chatButton);
layout.AddView(chatMessagesLabel);
layout.AddView(chatTextView);
SetContentView(layout);
#endregion
#region Configure the SignalR bindings
//Create the Hub Proxy connection
HubConnection connection = new HubConnection(HUB_URL);
IHubProxy hubProxy = connection.CreateHubProxy(HUB_NAME);
//Receive chat messages
hubProxy.On<string, string>(
SOMEONE_ELSE_IS_CHATTING_METHOD,
(p1, p2) =>
{
//Need to ensure the changes are in the UI thread,
//since SignalR can fire the events from a different thread
RunOnUiThread(() =>
chatTextView.Append(String.Format("{0}: {1}\n", p1, p2))
);
});
//Send out chat messages
chatButton.Click += (sender, e) =>
{
hubProxy.Invoke<String[]>(
I_AM_CHATTING_METHOD,
new String[] { "Android", chatInput.Text });
chatInput.Text = "";
};
//Start the link with the hub
connection.Start().Wait();
#endregion
}
示例3: InspectorView
public InspectorView(Android.Content.Context context, TextView view)
: base(context, CreateInstance ())
{
textView = view;
textView.Append ("Vulkan instance created\n\n");
}