removed floating log out

This commit is contained in:
Marcin Jedyński 2018-10-28 23:02:05 +01:00
parent b0cfda8548
commit d879258266
2 changed files with 3 additions and 27 deletions

View File

@ -4,7 +4,6 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.widget.Toast;
@ -42,8 +41,7 @@ public class MapActivity extends BaseActivity {
// Customize map with markers, polylines, etc.
});
// TODO remove logout button
configureLogoutButton();
}
@ -91,21 +89,8 @@ public class MapActivity extends BaseActivity {
mapView.onSaveInstanceState(outState);
}
private void configureLogoutButton(){
// Logout button
final FloatingActionButton button = findViewById(R.id.logoutButton);
button.setOnClickListener(view -> {
PrefUtils.cleanUserLocalStorage(getApplicationContext());
Intent i = getBaseContext().getPackageManager()
.getLaunchIntentForPackage(getBaseContext().getPackageName());
if (i != null) {
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
}
startActivity(i);
finish();
});
}
private void fn_permission() {
if ((ContextCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {

View File

@ -19,16 +19,7 @@
</com.mapbox.mapboxsdk.maps.MapView>
<android.support.design.widget.FloatingActionButton
android:id="@+id/logoutButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="@dimen/fab_margin"
android:layout_marginTop="77dp"
app:backgroundTint="@android:color/holo_red_dark"
app:srcCompat="@android:drawable/ic_lock_power_off" />
<include
android:id="@+id/navigation"