Android Open Source - led-notifier About Activity






From Project

Back to project page led-notifier.

License

The source code is released under:

Apache License

If you think the Android project led-notifier listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.ciubotariu_levy.lednotifier;
//w w  w.j a v a  2s.  c om
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.support.v7.app.ActionBarActivity;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;

public class AboutActivity extends ActionBarActivity {
  private static String GH_URL = "http://www.github.com/";
  private String mVersionName = "";
  private CharSequence mAppName = "";
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about);

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    TextView appNameTextView = (TextView) findViewById (R.id.app_name);
    TextView appVersionTextView = (TextView) findViewById (R.id.app_version);
    try {
      mVersionName = getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName;
      mAppName = getPackageManager().getApplicationLabel(getApplicationInfo())+ " ";
    } catch (NameNotFoundException e) {
      //should not happen
    }

    appNameTextView.setText (mAppName);
    appVersionTextView.setText (mVersionName);
  }

  public void viewSite (View v){
    String fragment = null;
    switch (v.getId()){
    case R.id.andrei:
      fragment = "andreiciubotariu";
      break;
    case R.id.matthew:
      fragment = "LevyMatthew";
      break;
    default:
      fragment = "andreiciubotariu/led-notifier";
    }
    try{
      startActivity (new Intent (Intent.ACTION_VIEW,Uri.parse(GH_URL+fragment)));
    } catch (ActivityNotFoundException e){
      //usually won't happen.
      e.printStackTrace();
    }
  }

  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case android.R.id.home:
      Intent i = NavUtils.getParentActivityIntent(this);    
      i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      startActivity (i);
      return true;
    default: return super.onOptionsItemSelected(item);  
    }
  }
}




Java Source Code List

com.ciubotariu_levy.lednotifier.AboutActivity.java
com.ciubotariu_levy.lednotifier.AlarmDismissReceiver.java
com.ciubotariu_levy.lednotifier.BoldCheckedView.java
com.ciubotariu_levy.lednotifier.BootBroadcastReceiver.java
com.ciubotariu_levy.lednotifier.CircularColorView.java
com.ciubotariu_levy.lednotifier.ColorDialog.java
com.ciubotariu_levy.lednotifier.ColorVibrateDialog.java
com.ciubotariu_levy.lednotifier.ContactsFragment.java
com.ciubotariu_levy.lednotifier.CustomContactsFragment.java
com.ciubotariu_levy.lednotifier.DataFetcher.java
com.ciubotariu_levy.lednotifier.DefaultColorChooserContainer.java
com.ciubotariu_levy.lednotifier.FastScrollThemedListView.java
com.ciubotariu_levy.lednotifier.LEDCancelReceiver.java
com.ciubotariu_levy.lednotifier.MainActivity.java
com.ciubotariu_levy.lednotifier.NotificationService.java
com.ciubotariu_levy.lednotifier.NotificationUtils.java
com.ciubotariu_levy.lednotifier.ObserverService.java
com.ciubotariu_levy.lednotifier.SMSAppAdapter.java
com.ciubotariu_levy.lednotifier.SMSAppChooserContainer.java
com.ciubotariu_levy.lednotifier.SMSReceiver.java
com.ciubotariu_levy.lednotifier.SectionedCursorAdapter.java
com.ciubotariu_levy.lednotifier.SettingsActivity.java
com.ciubotariu_levy.lednotifier.SmsAppChooserDialog.java
com.ciubotariu_levy.lednotifier.providers.LedContactInfo.java
com.ciubotariu_levy.lednotifier.providers.LedContactProvider.java
com.ciubotariu_levy.lednotifier.providers.LedContacts.java
com.larswerkman.holocolorpicker.ColorPicker.java
com.larswerkman.holocolorpicker.EndColorPicker.java
com.larswerkman.holocolorpicker.LinearColorPicker.java
com.larswerkman.holocolorpicker.OnColorChangedListener.java
com.larswerkman.holocolorpicker.OpacityBar.java
com.larswerkman.holocolorpicker.SVBar.java
com.larswerkman.holocolorpicker.SaturationBar.java
com.larswerkman.holocolorpicker.ValueBar.java
com.makeramen.RoundedDrawable.java
com.makeramen.RoundedTransformationBuilder.java