title: How to apply FontSize dynamically and programmatically without using XML in Android?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/12704216/how-to-change-the-font-size-in-a-whole-application-programmatically-android">How to change the Font Size in a whole Application programmatically, Android?</a>  </p>
  </blockquote>
  
  
  
  <p>This is my Code : I have created Spinner with a list of FontSize options. If I click FontSize "26" then it should be able to change in that specific FontSize. Below I have an EditBox. So if I clicked Fontsize as 40 and in a Italic style than usual Bold.  So I should be able to type inside EditBox with this selected "Font" : FontSize "40" and Italic style. </p>
  
  <p>How could I do this programmatically in Android?</p>
  
  <pre><code>font=new Spinner(con);
  option= new String[] {"Select Font Size","8","10","12","14","16","18","20",
                        "22","24","26","28","30","32","34","36","38","40","50"};
  ArrayAdapter&lt;String&gt; adapter= new ArrayAdapter&lt;String&gt;(con,android.R.layout.simple_spinner_dropdown_item,option);
  adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  
  font.setOnItemSelectedListener(new OnItemSelectedListener() {
      @Override
      public void onItemSelected(AdapterView&lt;?&gt; arg0, View arg1,int position, long id) {
          option[1]="8";
         selectedItem= option[position];
      }
      @Override
      public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
      }
  });
  </code></pre>