package ca.bmaupin.test;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class Test extends Activity {
    private static final String TAG = "Test";
    
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        AutofitTextView tv = (AutofitTextView) findViewById(R.id.leftView);
        tv.setTextSize(42f);
//        tv.setTextSize(22.868164f);
        // short word
//        tv.setText("test");
        // long word
//        tv.setText("internationally");
//        tv.setText("test");
        
        // multiple words
//        tv.setText("test some words");
//        tv.setText("supercalafragalisticexpialadocious");
        // multiple long words
//        Log.d(TAG, "tv.getTextSize())" + tv.getTextSize());
        
//        tv.setText("mathematics, appointmentslongword playgrounds,  international");
//        tv.setText("longword mathematics, playgrounds, mathematics");
//        Log.d(TAG, "tv.getTextSize())" + tv.getTextSize());
        
/*        
        tv.setText("test");
        tv.setText("mathematics, appointmentslongword playgrounds,  international");
        tv.setText("test");
        
        tv.setText("test");
        tv.setText("internationally");
        tv.setText("test some words");
        tv.setText("internationally");
        tv.setText("appointments mathematics, playgrounds, mathematics");
        tv.setText("mathematics, appointmentslongword playgrounds,  international");
*/
        tv.setText("Feast of Immolation/sacrifice");
        tv.setText("good-looking");
        tv.setText("immediately (parents, siblings) and extended families; extended families");
    }
    
    /* Inflates the menu */
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.menu, menu);
        return true;
    }
    
    /* Handles menu selections */
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
        case R.id.menu_exit:
            finish();
            return true;
        }
        return false;
    }
}

@@ -504,1407 +504,8 @@
     
-AutofitTextView tv = (AutofitTextView) findViewById(R.id.leftView);%0A        tv.setTextSize(42f);%0A//        tv.setTextSize(22.868164f);%0A        // short word%0A//        tv.setText(%22test%22);%0A        // long word%0A//        tv.setText(%22internationally%22);%0A//        tv.setText(%22test%22);%0A        %0A        // multiple words%0A//        tv.setText(%22test some words%22);%0A//        tv.setText(%22supercalafragalisticexpialadocious%22);%0A        // multiple long words%0A//        Log.d(TAG, %22tv.getTextSize())%22 + tv.getTextSize());%0A        %0A//        tv.setText(%22mathematics, appointmentslongword playgrounds,  international%22);%0A//        tv.setText(%22longword mathematics, playgrounds, mathematics%22);%0A//        Log.d(TAG, %22tv.getTextSize())%22 + tv.getTextSize());%0A        %0A/*        %0A        tv.setText(%22test%22);%0A        tv.setText(%22mathematics, appointmentslongword playgrounds,  international%22);%0A        tv.setText(%22test%22);%0A        %0A        tv.setText(%22test%22);%0A        tv.setText(%22internationally%22);%0A        tv.setText(%22test some words%22);%0A        tv.setText(%22internationally%22);%0A        tv.setText(%22appointments mathematics, playgrounds, mathematics%22);%0A        tv.setText(%22mathematics, appointmentslongword playgrounds,  international%22);%0A*/%0A        tv.setText(%22Feast of Immolation/sacrifice%22);%0A        tv.setText(%22good-looking%22);%0A        tv.setText(%22immediately (parents, siblings) and extended families; extended families%22);
 %0A   

test cleanup