fix back button in AboutActivity
This commit is contained in:
parent
03ee84bf35
commit
5d1362f385
|
@ -9,7 +9,7 @@ import androidx.databinding.DataBindingUtil;
|
||||||
import eu.siacs.conversations.R;
|
import eu.siacs.conversations.R;
|
||||||
import eu.siacs.conversations.databinding.ActivityAboutBinding;
|
import eu.siacs.conversations.databinding.ActivityAboutBinding;
|
||||||
|
|
||||||
public class AboutActivity extends BaseActivity {
|
public class AboutActivity extends ActionBarActivity {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
package eu.siacs.conversations.ui;
|
package eu.siacs.conversations.ui;
|
||||||
|
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.ActionBar;
|
import androidx.appcompat.app.ActionBar;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
import androidx.appcompat.widget.Toolbar;
|
|
||||||
|
|
||||||
|
|
||||||
public abstract class ActionBarActivity extends BaseActivity {
|
public abstract class ActionBarActivity extends BaseActivity {
|
||||||
public static void configureActionBar(ActionBar actionBar) {
|
public static void configureActionBar(ActionBar actionBar) {
|
||||||
|
@ -20,17 +16,11 @@ public abstract class ActionBarActivity extends BaseActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSupportActionBar(View toolbar) {
|
|
||||||
super.setSupportActionBar((Toolbar) toolbar);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(final MenuItem item) {
|
public boolean onOptionsItemSelected(final MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
if (item.getItemId() == android.R.id.home) {
|
||||||
case android.R.id.home:
|
finish();
|
||||||
finish();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue