Delete Navigation_Top.java
This commit is contained in:
@@ -1,80 +0,0 @@
|
|||||||
package com.ShanMukhaInnovations.ArrestTB;
|
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.Window;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
import androidx.appcompat.widget.Toolbar;
|
|
||||||
import androidx.drawerlayout.widget.DrawerLayout;
|
|
||||||
|
|
||||||
import com.google.android.material.navigation.NavigationView;
|
|
||||||
|
|
||||||
public class Navigation_Top extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
|
|
||||||
|
|
||||||
protected DrawerLayout draw;
|
|
||||||
private LinearLayout line;
|
|
||||||
private Toolbar tool;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
|
|
||||||
switch (menuItem.getItemId())
|
|
||||||
{
|
|
||||||
case R.id.logout:
|
|
||||||
Intent intent=new Intent(this,Login_Screen.class);
|
|
||||||
startActivity(intent);
|
|
||||||
break;
|
|
||||||
case R.id.nav_contact_us:
|
|
||||||
Intent intent1=new Intent(this,About.class);
|
|
||||||
startActivity(intent1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
|
||||||
|
|
||||||
setContentView(R.layout.activity_navigation__top);
|
|
||||||
|
|
||||||
|
|
||||||
draw = findViewById(R.id.Drawer);
|
|
||||||
line = findViewById(R.id.line);
|
|
||||||
tool = findViewById(R.id.tollbar);
|
|
||||||
NavigationView navigationView = findViewById(R.id.navigation);
|
|
||||||
navigationView.setNavigationItemSelectedListener(this);
|
|
||||||
|
|
||||||
setSupportActionBar(tool);
|
|
||||||
|
|
||||||
Window window = getWindow();
|
|
||||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
|
||||||
|
|
||||||
|
|
||||||
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, draw, tool, R.string.open_navigation_drawer, R.string.close_navigation_drawer) {
|
|
||||||
@Override
|
|
||||||
public void onDrawerSlide(View drawerView, float slideOffset) {
|
|
||||||
super.onDrawerSlide(drawerView, slideOffset);
|
|
||||||
float sidebar = drawerView.getWidth() * slideOffset;
|
|
||||||
line.setTranslationX(sidebar);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
draw.addDrawerListener(toggle);
|
|
||||||
toggle.syncState();
|
|
||||||
View headerView = navigationView.getHeaderView(0);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user