at.bitfire.davdroid.MainActivity.java Source code

Java tutorial

Introduction

Here is the source code for at.bitfire.davdroid.MainActivity.java

Source

/*******************************************************************************
 * Copyright (c) 2014 Richard Hirner (bitfire web engineering).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     Richard Hirner (bitfire web engineering) - initial API and implementation
 ******************************************************************************/
package at.bitfire.davdroid;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.widget.TextView;

public class MainActivity extends FragmentActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);

        setTitle("CardDroid " + Constants.APP_VERSION);

        TextView tv = (TextView) findViewById(R.id.text_info);
        tv.setText(Html.fromHtml(getString(R.string.html_info)));
        tv.setMovementMethod(LinkMovementMethod.getInstance());
    }
}