public static void main(String[] args) {
    // System.out.println(42); // the answer to the universe...
    ApplicationEnvironment.init();
    GlobalFunctions.create();

    // start the main function
    GlobalFunctions.instance.bar();

    // System.exit(0);
  }
Example #2
0
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();

    if (id == R.id.action_settings) {
      GlobalFunctions.launchSettings(NewsFeed.this);
      return true;
    }

    return super.onOptionsItemSelected(item);
  }
Example #3
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    if (!GlobalFunctions.isSessionAlive) {
      finish();
    }
    GlobalFunctions.lookupLocale(this);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_news_feed);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbarNews);
    setSupportActionBar(toolbar);

    int uid = GlobalFunctions.getUid();

    View userDisplayFragmet = findViewById(R.id.userDisplayFragment);
    assert userDisplayFragmet != null;
    userDisplayFragmet.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            Intent intent = new Intent(NewsFeed.this, ProfileActivity.class);
            startActivity(intent);
          }
        });
  }