Building the Android ChatActivity
Let's move back to the Android implementation. This part is easy, we have already mapped the UI logic to the ChatPresenter
, so let's get straight into building the interface. Add a new file to the Views
folder in the Chat.Droid
project, call it ChatActivity.cs
, and implement the first part:
[Activity(Label = "Chat", ScreenOrientation = ScreenOrientation.Portrait)] public class ChatView : ListActivity, ChatPresenter.IChatView { #region Private Properties private ChatPresenter _presenter; private LinearLayout _scrollViewInnerLayout; private EditText _editText; private long _lastSendClick = 0; private int _width; private float _currentTop; private bool _dialogShown = false; #endregion #region Protected Methods protected override void OnCreate(Bundle bundle) { ...