Android Open Source - palhike Details






From Project

Back to project page palhike.

License

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.

Java Source Code

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);
      }
      
    }
    
  }

  

}




Java Source Code List

com.palhike.android.DataBaseHelper.java
com.palhike.android.Details.java
com.palhike.android.FragmentInfo.java
com.palhike.android.Home.java
com.palhike.android.IntentIntegrator.java
com.palhike.android.IntentResult.java
com.palhike.android.Login.java
com.palhike.android.ObjectModel.java
com.palhike.android.Page.java
com.palhike.android.SettingsActivity.java
com.palhike.android.TestAdapter.java
com.palhike.android.TreeTabs.java
com.palhike.android.TreeViewData.java
com.palhike.android.WelcomeActivity.java