@Override
 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
   switch (position) {
     case 0: // Launch Navigation to the conference site
       Intent i =
           new Intent(
               android.content.Intent.ACTION_VIEW, Uri.parse(getString(R.string.url_map_place)));
       startActivity(i);
       break;
     case 1: // Display the Open Source projects used for this application
       Intent i1 = new Intent(getApplicationContext(), LibsActivity.class);
       i1.putExtra(Libs.BUNDLE_FIELDS, Libs.toStringArray(R.string.class.getFields()));
       i1.putExtra(Libs.BUNDLE_LIBS, new String[] {"OpenCSV", "PrettySharedPreferences"});
       i1.putExtra(Libs.BUNDLE_VERSION, true);
       i1.putExtra(Libs.BUNDLE_LICENSE, true);
       i1.putExtra(Libs.BUNDLE_TITLE, "Open Source");
       i1.putExtra(Libs.BUNDLE_THEME, R.style.AppThemeBar);
       startActivity(i1);
       break;
     case 2: // Open my twitter ;)
       Intent i2 = new Intent(Intent.ACTION_VIEW);
       i2.setData(Uri.parse("http://twitter.com/Tajchert"));
       startActivity(i2);
       break;
     case 3: // Open the feedback form
       Intent i3 = new Intent(Intent.ACTION_VIEW);
       i3.setData(Uri.parse(getString(R.string.url_feedback_form)));
       startActivity(i3);
       break;
   }
 }
示例#2
0
 @SuppressWarnings("UnusedDeclaration")
 @OnClick(R.id.open_source_button)
 void openSourceButtonClicked() {
   Intent i = new Intent(getApplicationContext(), LibsActivity.class);
   final String[] value = Libs.toStringArray(R.string.class.getFields());
   i.putExtra(Libs.BUNDLE_LIBS, new String[] {"Eventbus", "NineOldAndroids"});
   i.putExtra(Libs.BUNDLE_FIELDS, value);
   i.putExtra(Libs.BUNDLE_VERSION, true);
   i.putExtra(Libs.BUNDLE_LICENSE, true);
   i.putExtra(Libs.BUNDLE_TITLE, getResources().getString(R.string.open_source_licenses));
   i.putExtra(Libs.BUNDLE_THEME, R.style.AppThemeCompat);
   startActivity(i);
 }