mirror of
https://github.com/FatttSnake/OxygenToolbox.git
synced 2026-04-06 07:21:29 +08:00
Optimized exit experience
This commit is contained in:
12
.idea/deploymentTargetDropDown.xml
generated
12
.idea/deploymentTargetDropDown.xml
generated
@@ -1,18 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="deploymentTargetDropDown">
|
<component name="deploymentTargetDropDown">
|
||||||
<runningDeviceTargetSelectedWithDropDown>
|
|
||||||
<Target>
|
|
||||||
<type value="RUNNING_DEVICE_TARGET" />
|
|
||||||
<deviceKey>
|
|
||||||
<Key>
|
|
||||||
<type value="VIRTUAL_DEVICE_PATH" />
|
|
||||||
<value value="G:\Android\Avd\Pixel_4_API_31.avd" />
|
|
||||||
</Key>
|
|
||||||
</deviceKey>
|
|
||||||
</Target>
|
|
||||||
</runningDeviceTargetSelectedWithDropDown>
|
|
||||||
<timeTargetWasSelectedWithDropDown value="2022-04-02T05:34:24.063753700Z" />
|
|
||||||
<runningDeviceTargetsSelectedWithDialog>
|
<runningDeviceTargetsSelectedWithDialog>
|
||||||
<Target>
|
<Target>
|
||||||
<type value="RUNNING_DEVICE_TARGET" />
|
<type value="RUNNING_DEVICE_TARGET" />
|
||||||
|
|||||||
8
.idea/vcs.xml
generated
8
.idea/vcs.xml
generated
@@ -1,13 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="GithubSharedProjectSettings">
|
|
||||||
<option name="branchProtectionPatterns">
|
|
||||||
<list>
|
|
||||||
<option value="master" />
|
|
||||||
<option value="dev" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -64,13 +64,15 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (navigationView.getMenu().getItem(0).isChecked()) {
|
if (navigationView.getMenu().getItem(0).isChecked()) {
|
||||||
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
|
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
|
||||||
fab.setVisibility(View.VISIBLE);
|
fab.setVisibility(View.VISIBLE);
|
||||||
} else if (navigationView.getMenu().getItem(4).isChecked()) {
|
|
||||||
finish();
|
|
||||||
} else {
|
} else {
|
||||||
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
||||||
fab.setVisibility(View.GONE);
|
fab.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
navigationView.getMenu().getItem(4).setOnMenuItemClickListener(item -> {
|
||||||
|
finish();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
// Passing each menu ID as a set of Ids because each
|
// Passing each menu ID as a set of Ids because each
|
||||||
// menu should be considered as top level destinations.
|
// menu should be considered as top level destinations.
|
||||||
mAppBarConfiguration = new AppBarConfiguration.Builder(R.id.nav_home)
|
mAppBarConfiguration = new AppBarConfiguration.Builder(R.id.nav_home)
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
package com.fatapp.oxygentoolbox.ui.exit;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
|
|
||||||
public class ExitFragment extends Fragment {
|
|
||||||
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -29,7 +29,4 @@
|
|||||||
android:label="@string/menu_about"
|
android:label="@string/menu_about"
|
||||||
tools:layout="@layout/fragment_about" />
|
tools:layout="@layout/fragment_about" />
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/nav_exit"
|
|
||||||
android:name="com.fatapp.oxygentoolbox.ui.exit.ExitFragment" />
|
|
||||||
</navigation>
|
</navigation>
|
||||||
Reference in New Issue
Block a user