design the edit profile view

This commit is contained in:
daycode 2017-04-30 21:57:15 +02:00
commit b82d75a6c4
6 changed files with 93 additions and 72 deletions

View file

@ -38,6 +38,7 @@ import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ProgressBar;
@ -73,14 +74,14 @@ public class EditProfileActivity extends BaseActivity {
HEADER
}
@BindView(R.id.edit_profile_display_name) EditText displayNameEditText;
@BindView(R.id.edit_profile_note) EditText noteEditText;
@BindView(R.id.edit_profile_avatar) Button avatarButton;
@BindView(R.id.edit_profile_avatar_preview) ImageView avatarPreview;
@BindView(R.id.edit_profile_avatar_progress) ProgressBar avatarProgress;
@BindView(R.id.edit_profile_header) Button headerButton;
@BindView(R.id.edit_profile_header) ImageButton headerButton;
@BindView(R.id.edit_profile_header_preview) ImageView headerPreview;
@BindView(R.id.edit_profile_header_progress) ProgressBar headerProgress;
@BindView(R.id.edit_profile_avatar) ImageButton avatarButton;
@BindView(R.id.edit_profile_avatar_preview) ImageView avatarPreview;
@BindView(R.id.edit_profile_avatar_progress) ProgressBar avatarProgress;
@BindView(R.id.edit_profile_display_name) EditText displayNameEditText;
@BindView(R.id.edit_profile_note) EditText noteEditText;
@BindView(R.id.edit_profile_save_progress) ProgressBar saveProgress;
private String priorDisplayName;
@ -100,7 +101,7 @@ public class EditProfileActivity extends BaseActivity {
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setTitle(null);
actionBar.setTitle(getString(R.string.title_edit_profile));
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayShowHomeEnabled(true);
}
@ -121,6 +122,8 @@ public class EditProfileActivity extends BaseActivity {
headerBase64 = null;
}
avatarButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {