Thingse/app/src/main/java/com/daneshzaki/thingse/EditSomething.java
//fill fields on screen with selected thing's values
fill fields on screen with selected thing's values
fill fields on screen with selected thing ' s values
private void loadValues()
    {    
    	((EditText)findViewById( R.id.thingField)).setText(bundle.getString("name"));
        ActionBar actionBar = getActionBar();
		actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#33B5E5")));
        actionBar.setTitle( bundle.getString("name"));
        actionBar.setHomeButtonEnabled(true);
		actionBar.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_TITLE);
		Typeface typeface = Typeface.createFromAsset(getResources().getAssets(), "SourceSansPro-Regular.otf");
		((EditText)findViewById( R.id.thingField)).setTypeface(typeface);
		((EditText)findViewById( R.id.priceField)).setTypeface(typeface);
		((EditText)findViewById( R.id.descField)).setTypeface(typeface);
		((CheckBox)findViewById( R.id.giftCheck)).setTypeface(typeface);
		((TextView)findViewById( R.id.picLabel)).setTypeface(typeface);
		((Button)findViewById( R.id.datePurchField)).setTypeface(typeface);
		((Button)findViewById( R.id.datePurchField)).setAllCaps(false);
		((Button)findViewById( R.id.uploadButton)).setTypeface(typeface);
		((Button)findViewById( R.id.cameraButton)).setTypeface(typeface);
		((TextView)findViewById( R.id.picLocation)).setTypeface(typeface);
    	if(bundle.getString("price").trim().startsWith("Gift :"))
    	{
    		((TextView)findViewById( R.id.datePurchField)).setText("Received on ");
    		((CheckBox)findViewById( R.id.giftCheck)).setChecked(true);	
    	}
    	else
    	{
    		String priceNoCur = bundle.getString("price").replaceAll(curSymbol,"");
    		((EditText)findViewById( R.id.priceField)).setText(priceNoCur);	
    	}
    	((Button)findViewById( R.id.datePurchField)).setText(bundle.getString("purchaseDate"));
    	if(bundle.getString("description")!= null)
    	{
    		((EditText)findViewById( R.id.descField)).setText(bundle.getString("description"));	
    	}
    	else
    	{
    		((EditText)findViewById( R.id.descField)).setText(" ");
    	}
		if(bundle.getString("picLocation")!= null && bundle.getString("picLocation").trim().length()>0)
    	{
    		((TextView)findViewById(R.id.picLabel)).setText( "Replace Picture?");
    	}
    	else
    	{
    		((TextView)findViewById(R.id.picLabel)).setText( "Set Picture");
    	}
    }
private void loadValues ( ) { ( ( EditText ) findViewById ( R . id . thingField ) ) . setText ( bundle . getString ( "name" ) ) ; ActionBar actionBar = getActionBar ( ) ; actionBar . setBackgroundDrawable ( new ColorDrawable ( Color . parseColor ( "#33B5E5" ) ) ) ; actionBar . setTitle ( bundle . getString ( "name" ) ) ; actionBar . setHomeButtonEnabled ( true ) ; actionBar . setDisplayOptions ( ActionBar . DISPLAY_HOME_AS_UP | ActionBar . DISPLAY_SHOW_TITLE ) ; Typeface typeface = Typeface . createFromAsset ( getResources ( ) . getAssets ( ) , "SourceSansPro-Regular.otf" ) ; ( ( EditText ) findViewById ( R . id . thingField ) ) . setTypeface ( typeface ) ; ( ( EditText ) findViewById ( R . id . priceField ) ) . setTypeface ( typeface ) ; ( ( EditText ) findViewById ( R . id . descField ) ) . setTypeface ( typeface ) ; ( ( CheckBox ) findViewById ( R . id . giftCheck ) ) . setTypeface ( typeface ) ; ( ( TextView ) findViewById ( R . id . picLabel ) ) . setTypeface ( typeface ) ; ( ( Button ) findViewById ( R . id . datePurchField ) ) . setTypeface ( typeface ) ; ( ( Button ) findViewById ( R . id . datePurchField ) ) . setAllCaps ( false ) ; ( ( Button ) findViewById ( R . id . uploadButton ) ) . setTypeface ( typeface ) ; ( ( Button ) findViewById ( R . id . cameraButton ) ) . setTypeface ( typeface ) ; ( ( TextView ) findViewById ( R . id . picLocation ) ) . setTypeface ( typeface ) ; if ( bundle . getString ( "price" ) . trim ( ) . startsWith ( "Gift :" ) ) { ( ( TextView ) findViewById ( R . id . datePurchField ) ) . setText ( "Received on " ) ; ( ( CheckBox ) findViewById ( R . id . giftCheck ) ) . setChecked ( true ) ; } else { String priceNoCur = bundle . getString ( "price" ) . replaceAll ( curSymbol , "" ) ; ( ( EditText ) findViewById ( R . id . priceField ) ) . setText ( priceNoCur ) ; } ( ( Button ) findViewById ( R . id . datePurchField ) ) . setText ( bundle . getString ( "purchaseDate" ) ) ; if ( bundle . getString ( "description" ) != null ) { ( ( EditText ) findViewById ( R . id . descField ) ) . setText ( bundle . getString ( "description" ) ) ; } else { ( ( EditText ) findViewById ( R . id . descField ) ) . setText ( " " ) ; } if ( bundle . getString ( "picLocation" ) != null && bundle . getString ( "picLocation" ) . trim ( ) . length ( ) > 0 ) { ( ( TextView ) findViewById ( R . id . picLabel ) ) . setText ( "Replace Picture?" ) ; } else { ( ( TextView ) findViewById ( R . id . picLabel ) ) . setText ( "Set Picture" ) ; } }
fill fields on screen with selected thing's values
fill fields on screen with selected thing ' s values
//get all the controls and set values    	 //set fonts for all text //gift check //not a gift set the price //purchase date //description can be null //pic location can be null