среда, 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...


вторник, 13 сентября 2011 г.

Christmas Wallpapers

I've published Live WallPapers with Christmas Theme. It shows snow flakes falls down. Actually I made walpapers in last year but couldn't check how it works into real device.It was interesting to make the snow looks like real. If I find some time I will write how to create falling effect.

Add AdMob AdView to PreferenceActivity

Simple solution to add AdMob advert to Live Wallpaper settings screen is create new type which will show AdMob AdView and then include it into PreferenceScreen.

1) Add new type AdmobPreference:
public class AdmobPreference extends Preference
{
    public AdmobPreference(Context context) {
        super(context, null);
    }

    public AdmobPreference(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected View onCreateView(ViewGroup parent) {
        LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        return inflater.inflate(R.layout.admob_preference, null);
    }
}
2) Add admob_preference.xml to res/layout:

 
           

3) Now you can use your type within PreferenceScreen.


 
 ...

вторник, 10 августа 2010 г.

1.2 Update

New requested features added.
First is - "Love quotes" screen selection added with wide range of love quotes.
Now it looks like this:

среда, 10 февраля 2010 г.

Love letter application

I've just uploaded my application 'Love letters' to market.
My intention was creating an application for Valentine's Day which allows you send Valentine cards to your friends. No internet connection is needed if you just send MMS.
Also application allows to share picure and congratulation to your friends via our favourite app like FaceBook, twitter, flickr. You can also set images as wallpaper.
I'll appreciate all suggestions and comments. If you have any issues or found a bug - please let me know.
Have fun!