title: How can I make bold and underline a string dynamically in Android code?
body: <p>How can I make bold and italic the <strong>Branch Name:</strong>, <strong>Branch No:</strong>, <strong>Branch Phone No:</strong> and <strong>Branch Timings:</strong> in Java code? The database data should remain in simple format. These four are just headings of them. In this (current) case, it prints/displays the whole data in simple format and the user has a problem reading this data.</p>
  
  <pre><code>String branchInfoString = "" ;
  
  // fetching all the database data in a list
  List&lt;BranchInfo&gt; dbDataList = _dbHandler.getAllInfo() ;
  
  // getting that data into a string that will be displayed in TextView
  for(BranchInfo aBranch : dbDataList ){
  
  branchInfoString = branchInfoString + 
  
            "Branch Name: " + aBranch.getBranchName() + "\n" +
            "Branch No: " + aBranch.getBranchNo() + "\n" + 
            "Branch Phone No: " + aBranch.getBranchPhone() + "\n" + 
            "Branch Timings: " + aBranch.getBranchTiming() + "\n" + 
  
            "\n --------------------------------------- \n \n" ;  
  
  }
  
  // showing all the branch data in a text_view
  setContentView(R.layout.db_branch_list) ;
  TextView dbDataView = (TextView)findViewById(R.id.db_branch_list) ;
  dbDataView.setText(branchInfoString) ;
  </code></pre>