среда, 14 мая 2014 г.

Set TextSize programatically to Android TextView

As you probably know you should set TextSizes in sp units (other dimensions in dp). It is scale-independent pixels. 
So, you should set in your dimens file 
   
dimen name="month">32sp

Programatically you can set this textsize by 
    textview_name.setTextSize(TypedValue.COMPLEX_UNIT_PX,         getResources().getDimension(R.dimen.month));

Other combination incorrect.

суббота, 3 мая 2014 г.

logcat doesn't show any error/debug info huawei

I've bought huawei for testing purposes. Its perfect for its price but I can't see any error details on logcat, usb debugging seems impossible. I trying restart eclipse/adb server/looking at the ddms but nothing helps.No errors, no Log info, no debug. I have  huawei y300,  android 4.1, but it seems all huwei has the same 'feature'.

Solution is:
Dial
*#*#2846579#*#*
and you will see a hidden menu. Go ProjectMenu / Background Setting / Log setting and define the log availability (log swith) and level (log level setting).
And then make sure you restart your phone.
Please note this probably only applies to Huawei phones.
From here
Works as a charm...