Android Question SDK 14 as target - I hate all this

LucaMs

Expert
Licensed User
Longtime User
I have noticed this fact just now.

<uses-sdk android:minSdkVersion="4" />
upload_2014-5-11_20-37-38.png



<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14" />
upload_2014-5-11_20-38-7.png


Not only the colors are different, but the text is wrong!

W H Y ???
 

James Chamblin

Active Member
Licensed User
Longtime User
When you don't specify a targetSdkVersion, then the ADK defaults to whatever minSdkVersion is. So the look and feel of the app will be similar to a device that uses the minSdkVersion API, even when using a newer device. When you specify a targetSdkVersion, then the look and feel will be whatever is native to the device up to the targetSdkVersion API. This will allow you to make an app that works on older device while still appearing modern on newer devices.

Create your layout to look good on the targetSDKVersion and it should look fine on all versions your app runs. More information can be found on the Android developers website http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Looks to me like the text is same size but maybe the 9 patch image is acting ever so slightly different. I think the top is literally just not overflowing (if that makes sense and the bottom just is.
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
9-patch images - easy to create, difficult to master!
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
I am having a similar issue:
android:targetSdkVersion="4"
NagVer4.jpg



android:targetSdkVersion="14" - Ugh
NagVer14.jpg


I have had the following line in my
Manifest
SetActivityAttribute(StopNagging2, android:theme, @android:style/Theme.Translucent.NoTitleBar)
Which I tried changing to
SetActivityAttribute(StopNagging2, android:theme, @android:style/Theme)

As was suggested but it makes no difference. Does anyone have a solution?

And can someone explain why it is important to to up the sdk version?

Thanks
 
Upvote 0

ArminKH

Well-Known Member
you can set padding by using reflection lib to 0 from Right and Left And Top and Bottom
 
Upvote 0

ArminKH

Well-Known Member
ooops
my answer is to post 1
if u have same problem use my SmartString lib
 
Upvote 0
Top