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


C# TextView.Append方法代码示例

本文整理汇总了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();
        }
开发者ID:ravensorb,项目名称:AdMobBuddy,代码行数:23,代码来源:MainActivity.cs

示例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
        }
开发者ID:kipCasper,项目名称:xamarinandroidtest,代码行数:68,代码来源:MainActivity.cs

示例3: InspectorView

 public InspectorView(Android.Content.Context context, TextView view)
     : base(context, CreateInstance ())
 {
     textView = view;
     textView.Append ("Vulkan instance created\n\n");
 }
开发者ID:yongweisun,项目名称:VulkanSharp,代码行数:6,代码来源:InspectorView.cs


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