Commit 84e1ab35 authored by Mahima Induvara's avatar Mahima Induvara

Inteface Changed!

parent e94295ad
......@@ -30,7 +30,7 @@ class MainActivity : AppCompatActivity() {
setContentView(R.layout.activity_chatbot_main)
val retrofit = Retrofit.Builder()
.baseUrl("http://192.168.1.101:5000/")
.baseUrl("http://192.168.1.4:5000/")
.addConverterFactory(GsonConverterFactory.create())
.build()
......
......@@ -57,6 +57,13 @@ public class MainActivity extends AppCompatActivity {
NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
NavigationUI.setupWithNavController(navigationView, navController);
}
private void logout() {
FirebaseAuth.getInstance().signOut();
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);
finish();
}
@Override
public void onBackPressed() {
DrawerLayout drawer = findViewById(R.id.drawer_layout);
......@@ -70,6 +77,8 @@ public class MainActivity extends AppCompatActivity {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
finish();
logout();
}
});
builder.setPositiveButton("Cancle", new DialogInterface.OnClickListener() {
......@@ -82,13 +91,7 @@ public class MainActivity extends AppCompatActivity {
alrt.show();
}
}
private void logout() {
FirebaseAuth.getInstance().signOut();
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);
finish();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
......
......@@ -100,7 +100,7 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:text="Browse"
android:text="BROWSE"
android:textSize="16dp" />
<Button
......@@ -145,7 +145,7 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:text="User"
android:text="PRACTICAL"
android:textSize="16dp" />
<Button
......@@ -200,7 +200,7 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:text="Documents"
android:text="DOCUMENTS"
android:textSize="16dp" />
<Button
......@@ -245,7 +245,7 @@
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:text="Settings"
android:text="CALCULATOR"
android:textSize="16dp" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment