Back to project page weatherport.
The source code is released under:
Apache License
If you think the Android project weatherport listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Copyright (C) 2013 Dan Morrill/*w w w .ja v a2s . c o m*/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package dude.morrildl.weatherport; import android.app.ActionBar; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.text.Html; import android.view.MenuItem; import android.widget.TextView; /** * Activity that displays legally required information about app licensing. */ public class AboutActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.about); // all we do is display a wall of text ((TextView) findViewById(R.id.about_text)).setText(Html.fromHtml(getResources().getString( R.string.about_body))); ActionBar bar = getActionBar(); bar.setTitle(R.string.about_title); bar.setDisplayHomeAsUpEnabled(true); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { // handle up-nav in the Action Bar per Design Guide case android.R.id.home: Intent intent = new Intent(this, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); return true; default: return super.onOptionsItemSelected(item); } } }