Back to project page palhike.
The source code is released under:
GNU General Public License
If you think the Android project palhike listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.palhike.android; /* w ww . j a va2s. c o m*/ import android.content.Context; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; public class Details extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_details); Bundle extras = getIntent().getExtras(); LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); if(extras!=null){ String text = extras.getString("text"); String[] items = text.split("\r\n|\r|\n"); for(String item : items){ String[] entries = item.split(":"); String title= entries[0]; String value = entries[1]; LinearLayout details = (LinearLayout) findViewById(R.id.details); View itemView = inflater.inflate(R.layout.details_item, details, false); TextView itemTitle = (TextView) itemView.findViewById(R.id.itemTitle); TextView itemContent = (TextView) itemView.findViewById(R.id.itemValue); itemTitle.setText(title); itemContent.setText(value); details.addView(itemView); } } } }