package com.example.android.androidsimulator.activities;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.example.android.androidsimulator.R;

public class SelectedMessageContact extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_selected_message_contact);
    }
}

@@ -70,369 +70,2141 @@
 oid.
-support.v7.app.AppCompatActivity;%0Aimport android.os.Bundle;%0A%0Aimport com.example.android.androidsimulator.R;%0A%0Apublic class SelectedMessageContact extends AppCompatActivity %7B%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_selected_message_contact);%0A    %7D%0A%7D
+content.SharedPreferences;%0Aimport android.preference.PreferenceManager;%0Aimport android.support.v7.app.AppCompatActivity;%0Aimport android.os.Bundle;%0Aimport android.text.Editable;%0Aimport android.text.TextWatcher;%0Aimport android.view.View;%0Aimport android.widget.Button;%0Aimport android.widget.EditText;%0Aimport android.widget.Toast;%0A%0Aimport com.example.android.androidsimulator.R;%0Aimport com.example.android.androidsimulator.data.Messages;%0A%0Aimport java.util.ArrayList;%0A%0Apublic class SelectedMessageContact extends AppCompatActivity %7B%0A%0A    SharedPreferences preferences;%0A    SharedPreferences.Editor editor;%0A    ArrayList%3CMessages%3E messages;%0A    Button sendMessageButton;%0A    EditText contentMessage;%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_selected_message_contact);%0A%0A        contentMessage = (EditText) findViewById(R.id.message_editText);%0A        sendMessageButton = (Button) findViewById(R.id.sendMessage_button);%0A        sendMessageButton.setEnabled(false);%0A%0A        // setEvents%0A        setEvents();%0A%0A%0A    %7D%0A%0A    private void setEvents() %7B%0A        // enable button of sendMessage%0A        contentMessage.addTextChangedListener(new TextWatcher() %7B%0A            @Override%0A            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) %7B%0A%0A            %7D%0A%0A            @Override%0A            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) %7B%0A                if (contentMessage.length() %3E 0) %7B%0A                    sendMessageButton.setEnabled(true);%0A                %7D%0A                else %7B%0A                    sendMessageButton.setEnabled(false);%0A                %7D%0A            %7D%0A%0A            @Override%0A            public void afterTextChanged(Editable editable) %7B%0A%0A            %7D%0A        %7D);%0A%0A        // button send message%0A        sendMessageButton.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View v) %7B%0A                sendMessage();%0A            %7D%0A        %7D);%0A    %7D%0A%0A    private void sendMessage() %7B%0A     %0A    %7D%0A%7D%0A
 %0A

Add method of sendMessageButton - Enabled/Disabled