title: Android Studio Activity Login screen does not display password field and User Name field text does not display
body: <p>When I build my applicaiton in android emulator the Login Screen does not display password field and User Name Field Text.  I don't see any error in log cat file. I have checked and rechecked my activity_login.xml layout file and 
  
  <blockquote>
    <p>ActivityLogin.xml</p>
  </blockquote>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
      android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:id="@+id/toolbar"
      tools:context="com.example.kanak.selfdistructtext.LoginActivity"
      android:background="@color/background_floating_material_light"&gt;
  
  
  
  
  
      &lt;EditText
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/UserNameField"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true"
          android:text="@string/user_name_field"
          android:inputType="text" /&gt;
  
      &lt;EditText
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:inputType="textPassword"
          android:ems="10"
          android:id="@+id/PasswordField"
          android:layout_below="@+id/UserNameField"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true"
          android:text="@string/password_field" /&gt;
  
      &lt;Button
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="@string/log_in_button"
          android:id="@+id/Loginbutton"
          android:layout_below="@+id/PasswordField"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true" /&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textAppearance="?android:attr/textAppearanceSmall"
          android:text="@string/sing_up"
          android:id="@+id/Sign_up_link"
          android:layout_marginTop="74dp"
          android:layout_below="@+id/Loginbutton"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true"
          android:layout_marginLeft="151dp"
          android:layout_marginStart="151dp" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <blockquote>
    <p>MainActivity.Java</p>
  </blockquote>
  
  <pre><code>package com.example.kanak.selfdistructtext;
  
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.design.widget.FloatingActionButton;
  import android.support.design.widget.Snackbar;
  import android.support.v7.app.AppCompatActivity;
  import android.support.v7.widget.Toolbar;
  import android.app.ActionBar;
  import android.util.Log;
  import android.view.View;
  import android.view.Menu;
  import android.view.MenuItem;
  import com.parse.Parse;
  import com.parse.ParseAnalytics;
  import com.parse.ParseObject;
  import com.parse.ParseUser;
  
  
  public class MainActivity extends AppCompatActivity{
  
      public static final String TAG = MainActivity.class.getSimpleName();
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.app_bar_main);
         //Parse.initialize(this, "1UG3pTBg184gaIDzKNAqfrZnAYiXcW4xn8SSdiJv", "uTZhgB0edmy06OOdpcbriho7DypKsGybPfGZSGL1");
          // Parase Analytice
          ParseAnalytics.trackAppOpenedInBackground(getIntent());
          ParseUser currentUser = ParseUser.getCurrentUser();
          if (currentUser == null) {
              navigateToLogin();
          } else {
  
              Log.i(TAG, currentUser.getUsername());
          }
  
  
          Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
  
  
  
  
          FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
          fab.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                          .setAction("Action", null).show();
              }
          });
      }
  
      private void navigateToLogin() {
          Intent intent = new Intent(this, LoginActivity.class);
          intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
          startActivity(intent);
      }
  
      @Override
          public boolean onCreateOptionsMenu(Menu menu){
              // Inflate the menu; this adds items to the action bar if it is present.
              getMenuInflater().inflate(R.menu.menu_main, menu);
  
              return true;
          }
  
          @Override
          public boolean onOptionsItemSelected (MenuItem item){
              // Handle action bar item clicks here. The action bar will
              // automatically handle clicks on the Home/Up button, so long
              // as you specify a parent activity in AndroidManifest.xml.
              int id = item.getItemId();
  
              //noinspection SimplifiableIfStatement
              if (id == R.id.action_logout) {
                  ParseUser.logOut();
                  navigateToLogin();
  
              }
  
              return super.onOptionsItemSelected(item);
          }
      }
  </code></pre>
  
  <blockquote>
    <p>LoginActivity.Java</p>
  </blockquote>
  
  <pre><code>[package com.example.kanak.selfdistructtext;
  
  import android.app.Activity;
  import android.app.AlertDialog;
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.design.widget.FloatingActionButton;
  import android.support.design.widget.Snackbar;
  import android.support.v7.app.AppCompatActivity;
  import android.support.v7.widget.Toolbar;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;
  
  import com.parse.LogInCallback;
  import com.parse.ParseException;
  import com.parse.ParseUser;
  
  public class LoginActivity extends AppCompatActivity {
      protected EditText mUsername;
      protected EditText mPassword;
      protected Button mLoginButton;
      protected TextView mSignUpTextView;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.app_bar_main);
  
          mSignUpTextView = (TextView)findViewById(R.id.Sign_up_link);
          mSignUpTextView.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  Intent intent = new Intent(LoginActivity.this, SignUpActivity.class);
                  startActivity(intent);
  
  
              }
          });
  
          mUsername = (EditText)findViewById(R.id.UserNameField);
          mPassword = (EditText)findViewById(R.id.PasswordField);
          mLoginButton = (Button)findViewById(R.id.Loginbutton);
          mLoginButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  String username = mUsername.getText().toString();
                  String password = mPassword.getText().toString();
  
  
                  username = username.trim();
                  password = password.trim();
  
  
                  if (username.isEmpty() || password.isEmpty()) {
  
                      AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);
                      builder.setMessage(R.string.Login_Error_Message);
                      builder.setTitle(R.string.Login_Error_Title);
                      builder.setPositiveButton(android.R.string.ok, null);
                      AlertDialog dialog = builder.create();
                      dialog.show();
  
                  } else {
                      // Log In User
                      ParseUser.logInInBackground(username, password, new LogInCallback() {
                          @Override
                          public void done(ParseUser parseUser, ParseException e) {
  
                              if (e == null) {
  
                                  // success signing in
                                  Intent intent = new Intent(LoginActivity.this, MainActivity.class);
                                  intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                                  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
                                  startActivity(intent);
                              }
                              else {
  
                                  AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);
                                  builder.setMessage(e.getMessage());
                                  builder.setTitle(R.string.Login_Error_Title);
                                  builder.setPositiveButton(android.R.string.ok, null);
                                  AlertDialog dialog = builder.create();
                                  dialog.show();
                              }
  
                          }
                      });
  
                  }
              }
          });
  
  
          Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
  
  
  
          FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
          fab.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                          .setAction("Action", null).show();
              }
          });
  
  
          }
  
  
  
  }][1]
  </code></pre>