removed floating log out
This commit is contained in:
parent
b0cfda8548
commit
d879258266
@ -4,7 +4,6 @@ import android.content.Intent;
|
|||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
|
||||||
import android.support.v4.app.ActivityCompat;
|
import android.support.v4.app.ActivityCompat;
|
||||||
import android.support.v4.content.ContextCompat;
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
@ -42,8 +41,7 @@ public class MapActivity extends BaseActivity {
|
|||||||
// Customize map with markers, polylines, etc.
|
// Customize map with markers, polylines, etc.
|
||||||
|
|
||||||
});
|
});
|
||||||
// TODO remove logout button
|
|
||||||
configureLogoutButton();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -91,21 +89,8 @@ public class MapActivity extends BaseActivity {
|
|||||||
mapView.onSaveInstanceState(outState);
|
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() {
|
private void fn_permission() {
|
||||||
if ((ContextCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
|
if ((ContextCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)) {
|
||||||
|
@ -19,16 +19,7 @@
|
|||||||
|
|
||||||
</com.mapbox.mapboxsdk.maps.MapView>
|
</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
|
<include
|
||||||
android:id="@+id/navigation"
|
android:id="@+id/navigation"
|
||||||
|
Loading…
Reference in New Issue
Block a user