1

I have an address column on MySql Database like below.

enter image description here

This table data is fetching by Mobile Application. I would like to apply line break on address column data for Mobile application. How can I store data in Address column so that it will look like below in Mobile Application ?

2nd floor,
Stock Exchange Building,
9/F Motijheel C/A
Dhaka-1000

abu abu
  • 6,599
  • 19
  • 74
  • 131
  • You first need to know how could they render your code? Does the label support HTML markups (or other specific markups?) – Raptor Nov 17 '22 at 09:37
  • Save your Address like, Building Number, Street Name/Number, Area, State, Country, Pincode. And create a schema out of it. – mudit_sen Nov 17 '22 at 10:00

1 Answers1

1

You can store the data for address in HTML content string-

you can use <br> tag for this and tell to Android developer to load address string as HTML content. It will solve the problem.

Reference for Android developer- How to display HTML in TextView?

OR

we can use \n for break line in Android,so you can store address in below format, It may work.

"2nd floor, \n Stock Exchange Building, \n 9/F Motijheel C/A \n Dhaka-1000"
Aditya Nandardhane
  • 915
  • 1
  • 8
  • 22
  • Thanks @Aditya Nandardhane. What should I do if I can't talk to Android Developer ? Is there any MySql way ? Thanks. – abu abu Nov 17 '22 at 09:21
  • 1
    @abuabu In android we can use \n for next line so you can try this, It may work. e.g. "2nd floor, \n Stock Exchange Building, \n 9/F Motijheel C/A \n Dhaka-1000" – Aditya Nandardhane Nov 17 '22 at 09:37