m5 / MagicTextView

Other
243 stars 102 forks source link

strokeWidth should be dimensions #7

Closed ismaelorenstein closed 10 years ago

ismaelorenstein commented 10 years ago

I'm having an issue with strokeWidth being defined as a float - depending on the screen resolution, the text will look different

I guess the easiest solution is to just change it to dimension. On attr.xml:

And then on method MagiceTextView.formatMagicTextView: float strokeWidth = a.getDimension(R.styleable.MagicTextView_strokeWidth, 1);

kenyee commented 10 years ago

I'd second this...

RoundSparrow commented 10 years ago

Could also consider the density...

    final float scale = getContext().getResources().getDisplayMetrics().density;
m5 commented 10 years ago

I've moved the dimension types over to actual dimensions. So, numbers will need a dp/px suffix. Sorry for the delay, it was a good idea.