This commit is contained in:
Paul Schaub 2019-06-06 13:49:13 +02:00
parent 308ca9c467
commit 3e439bc378
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
4 changed files with 15 additions and 18 deletions

View file

@ -46,11 +46,11 @@ public class ChatInputFragment extends Fragment implements View.OnClickListener
return view; return view;
} }
@Override2 @Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) { public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState); super.onActivityCreated(savedInstanceState);
mViewModel = ViewModelProviders.of(this).get(ChatInputViewModel.class); mViewModel = ViewModelProviders.of(this).get(ChatInputViewModel.class);
// observeViewModel(mViewModel); observeViewModel(mViewModel);
} }
private void observeViewModel(ChatInputViewModel viewModel) { private void observeViewModel(ChatInputViewModel viewModel) {

View file

@ -16,6 +16,8 @@ import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.textfield.TextInputEditText;
import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.impl.JidCreate; import org.jxmpp.jid.impl.JidCreate;
import org.mercury_im.messenger.MercuryImApplication; import org.mercury_im.messenger.MercuryImApplication;
@ -40,10 +42,10 @@ public class LoginActivity extends AppCompatActivity implements TextView.OnEdito
// UI references. // UI references.
@BindView(R.id.jid) @BindView(R.id.jid)
private AutoCompleteTextView mJidView; TextInputEditText mJidView;
@BindView(R.id.password) @BindView(R.id.password)
private EditText mPasswordView; TextInputEditText mPasswordView;
private LoginViewModel viewModel; private LoginViewModel viewModel;
@ -160,4 +162,3 @@ public class LoginActivity extends AppCompatActivity implements TextView.OnEdito
return false; return false;
} }
} }

View file

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_horizontal" android:gravity="center_horizontal"
@ -11,15 +13,6 @@
android:paddingBottom="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".ui.login.LoginActivity"> tools:context=".ui.login.LoginActivity">
<!-- Login progress -->
<ProgressBar
android:id="@+id/login_progress"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:visibility="gone" />
<ScrollView <ScrollView
android:id="@+id/login_form" android:id="@+id/login_form"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -35,7 +28,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<AutoCompleteTextView <com.google.android.material.textfield.TextInputEditText
android:id="@+id/jid" android:id="@+id/jid"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -48,9 +41,11 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:passwordToggleEnabled="true"
app:passwordToggleContentDescription="@string/password_show_password">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/password" android:id="@+id/password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -88,4 +88,5 @@
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>
<string name="channel_name_foreground">Foreground Service</string> <string name="channel_name_foreground">Foreground Service</string>
<string name="channel_description_foreground">Service that keeps the app running</string> <string name="channel_description_foreground">Service that keeps the app running</string>
<string name="password_show_password">Show Password</string>
</resources> </resources>