DT @25.11.2015: Implemented menu functions (Exit = Go to home screen), about, support and help goes to riskahead homepage
This commit is contained in:
@@ -153,11 +153,19 @@ public class LoginActivity extends AppCompatActivity implements FacebookButtonFr
|
||||
int id = item.getItemId();
|
||||
|
||||
if((id == R.id.menu_action_exit)){
|
||||
finish();
|
||||
System.exit(0);
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.addCategory(Intent.CATEGORY_HOME);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}else if((id == R.id.menu_action_about)){
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.riskahead.net/about/"));
|
||||
startActivity(browserIntent);
|
||||
}else if((id == R.id.menu_action_help)){
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.riskahead.net/contact/"));
|
||||
startActivity(browserIntent);
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,6 +21,7 @@ public class StartActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_start);
|
||||
|
||||
btnLogin = (Button) findViewById(R.id.btn_start_login);
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.deke.risk.riskahead.helper;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.net.Uri;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
@@ -24,6 +25,7 @@ import org.deke.risk.riskahead.ReportActivity;
|
||||
import org.deke.risk.riskahead.ProfileActivity;
|
||||
import org.deke.risk.riskahead.ReportlistActivity;
|
||||
import org.deke.risk.riskahead.SettingsActivity;
|
||||
import org.deke.risk.riskahead.StartActivity;
|
||||
import org.deke.risk.riskahead.SubscriptionsActivity;
|
||||
import org.deke.risk.riskahead.ViewReportActivity;
|
||||
|
||||
@@ -262,8 +264,16 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
int id = item.getItemId();
|
||||
|
||||
if((id == R.id.menu_action_exit)){
|
||||
finish();
|
||||
System.exit(0);
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.addCategory(Intent.CATEGORY_HOME);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}else if((id == R.id.menu_action_about)){
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.riskahead.net/about/"));
|
||||
startActivity(browserIntent);
|
||||
}else if((id == R.id.menu_action_help)){
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.riskahead.net/contact/"));
|
||||
startActivity(browserIntent);
|
||||
}
|
||||
|
||||
if (mDrawerToggle.onOptionsItemSelected(item)) {
|
||||
|
||||
Reference in New Issue
Block a user