Commit 5815eebb authored by Grigory Fedorov's avatar Grigory Fedorov

ContactViewer "up" button missing fixed.

parent 22b85505
...@@ -5,12 +5,10 @@ import android.content.Context; ...@@ -5,12 +5,10 @@ import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.text.InputType; import android.text.InputType;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View;
import android.widget.EditText; import android.widget.EditText;
import com.xabber.android.R; import com.xabber.android.R;
...@@ -39,15 +37,6 @@ public class ContactEditor extends ContactViewer implements Toolbar.OnMenuItemCl ...@@ -39,15 +37,6 @@ public class ContactEditor extends ContactViewer implements Toolbar.OnMenuItemCl
toolbar.inflateMenu(R.menu.contact_viewer); toolbar.inflateMenu(R.menu.contact_viewer);
toolbar.setOnMenuItemClickListener(this); toolbar.setOnMenuItemClickListener(this);
} }
toolbar.setNavigationIcon(R.drawable.ic_arrow_left_white_24dp);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavUtils.navigateUpFromSameTask(ContactEditor.this);
}
});
} }
@Override @Override
......
...@@ -18,6 +18,8 @@ import android.content.Context; ...@@ -18,6 +18,8 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.support.v7.widget.Toolbar;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
...@@ -117,6 +119,15 @@ public class ContactViewer extends ManagedActivity implements ...@@ -117,6 +119,15 @@ public class ContactViewer extends ManagedActivity implements
contactTitleView.findViewById(R.id.status_icon).setVisibility(View.GONE); contactTitleView.findViewById(R.id.status_icon).setVisibility(View.GONE);
contactTitleView.findViewById(R.id.status_text).setVisibility(View.GONE); contactTitleView.findViewById(R.id.status_text).setVisibility(View.GONE);
contactNameView = (TextView) contactTitleView.findViewById(R.id.name); contactNameView = (TextView) contactTitleView.findViewById(R.id.name);
Toolbar toolbar = contactTitleExpandableToolbarInflater.getToolbar();
toolbar.setNavigationIcon(R.drawable.ic_arrow_left_white_24dp);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavUtils.navigateUpFromSameTask(ContactViewer.this);
}
});
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment