Android Open Source - mg-android-app Item Detail Activity






From Project

Back to project page mg-android-app.

License

The source code is released under:

MIT License

If you think the Android project mg-android-app 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.github.tscholze.mgapp.mobile;
// ww  w. jav  a2 s.c o m
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.Html;
import android.text.method.ScrollingMovementMethod;
import android.webkit.WebView;
import android.widget.TextView;


public class ItemDetailActivity
        extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_item_detail);

        Intent intent = getIntent();

        if (getActionBar() != null)
        {
            getActionBar().setTitle(intent.getStringExtra(ItemListActivity.EXTRA_SELECTED_ITEM_TITLE));
        }

        String itemContent = intent.getStringExtra(ItemListActivity.EXTRA_SELECTED_ITEM_CONTENT);
        TextView content = ((TextView)(findViewById(R.id.detail_content_web_view)));
        content.setText(Html.fromHtml(itemContent));
        content.setMovementMethod(new ScrollingMovementMethod());
    }
}




Java Source Code List

com.github.tscholze.mgapp.mobile.ApplicationTest.java
com.github.tscholze.mgapp.mobile.ItemDetailActivity.java
com.github.tscholze.mgapp.mobile.ItemListActivity.java