Android Open Source - TheNewBoston Opened Class






From Project

Back to project page TheNewBoston.

License

The source code is released under:

Eclipse Public License - v 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECI...

If you think the Android project TheNewBoston 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.homelysoft.thenewboston;
//  w ww .  java2 s  . com
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.widget.Button;
import android.widget.RadioGroup;
import android.widget.TextView;

public class OpenedClass extends Activity implements View.OnClickListener,
    android.widget.RadioGroup.OnCheckedChangeListener {
  TextView question, test;
  Button returnData;
  RadioGroup nounSelect;
  String receivedBread,data;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.receive);
    bridgeXML();
    setOnClickListeners();
    
    SharedPreferences preferences=PreferenceManager.getDefaultSharedPreferences(getBaseContext());
    String name=preferences.getString("name", "Reuben");
    String values=preferences.getString("list", "4");
    
    if(values.contentEquals("1"))
    {
      question.setText(name+" is...");
    }
    
    /*Bundle recievedBasket=getIntent().getExtras();
    receivedBread=recievedBasket.getString("myString");
    question.setText(receivedBread);*/
  }

  public void bridgeXML() {
    question = (TextView) findViewById(R.id.tv_noun_prompt);
    test = (TextView) findViewById(R.id.tv_text);
    returnData = (Button) findViewById(R.id.b_return);
    nounSelect = (RadioGroup) findViewById(R.id.rg_noun_select);
  }

  public void setOnClickListeners() {
    returnData.setOnClickListener(this);
    nounSelect.setOnCheckedChangeListener(this);
  }

  @Override
  public void onClick(View v) {
    Bundle backpack=new Bundle();
    Intent person=new Intent();
    backpack.putString("SELECTED_NOUN", data);
    person.putExtras(backpack);
    setResult(RESULT_OK,person);
    finish();

  }

  @Override
  public void onCheckedChanged(RadioGroup group, int checkedId) {
    switch (checkedId) {
    case R.id.rg_noun_selection_1:
      data=getResources().getString(R.string.rg_noun_selection_comment_1);
      break;
    case R.id.rg_noun_selection_2:
      data=getResources().getString(R.string.rg_noun_selection_comment_2);
      break;
    case R.id.rg_noun_selection_3:
      data=getResources().getString(R.string.rg_noun_selection_comment_3);
      break;
    }
    test.setText(data);
  }
}




Java Source Code List

com.homelysoft.thenewboston.AboutUs.java
com.homelysoft.thenewboston.Accelerate.java
com.homelysoft.thenewboston.Data.java
com.homelysoft.thenewboston.Email.java
com.homelysoft.thenewboston.ExternalData.java
com.homelysoft.thenewboston.Flipper.java
com.homelysoft.thenewboston.Home.java
com.homelysoft.thenewboston.HotOrNot.java
com.homelysoft.thenewboston.InternalData.java
com.homelysoft.thenewboston.OpenedClass.java
com.homelysoft.thenewboston.OurViewClient.java
com.homelysoft.thenewboston.Photo.java
com.homelysoft.thenewboston.Preferences.java
com.homelysoft.thenewboston.SQLView.java
com.homelysoft.thenewboston.SQLite.java
com.homelysoft.thenewboston.SharedPrefs.java
com.homelysoft.thenewboston.Slider.java
com.homelysoft.thenewboston.SoundPoolPlay.java
com.homelysoft.thenewboston.Splash.java
com.homelysoft.thenewboston.StartingPoint.java
com.homelysoft.thenewboston.Tabs.java
com.homelysoft.thenewboston.TextPlay.java
com.homelysoft.thenewboston.gfx.GFXSurface.java
com.homelysoft.thenewboston.gfx.GFX.java
com.homelysoft.thenewboston.gfx.MyBringBack.java
com.homelysoft.thenewboston.vect.Vector.java