Android: How to make the text size of Borderless button same as that of TextView -


in following 2 images, there 4 widgets in horizontal linear layout:

  1. a textview text results:
  2. a borderless button text my cat
  3. a view hack "vertical separator"
  4. a borderless button text my dog

two questions:

  1. results: in first 1 bold because used <b> tag around in string resources file. used <strong> tag in second one, not make bold.

    i did read that strong has semantic meaning, may screen reader blind people read in different tone, blind people. but visually, should bold, isn't it?

  2. i want text in buttons of same size textview. believe need text size of textview (or default size in android system? or "default size" on user's device? :s ) in sp (because sp scaled user's font preference) and set text size of button same that? how can that?

can in xml? or possible programatically? , how?

enter image description here

enter image description here

use android:textstyle="bold" bold text , android:textsize="12sp" change text size of button in xml.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -