Adding a “%” sign to the back of a number

I'm making a calculator to understand how apps are made. My question is, how can I add a "%" to the back of a number that changes? I have a number called totalTextView. This number is 0 to begin with, but also displays the answer to the calculation. If the answer is "25", it says "25.0", which is what I want. But, I would like to add a "%" so it would look more like this "25.0%". How do I do this? My code for the calculation:

 Button calcBtn = (Button) findViewById(; calcBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { float percentage = Float.parseFloat(percentageTxt.getText().toString()); float dec = percentage / Float.parseFloat(numberTxt.getText().toString()); float total = dec * 100; totalTextView.setText(Float.toString(total)); } }); 

by Aski09 via /r/csharp

Leave a Reply