How to add textDirection support to API 8? - android

I want to create an Android app using API 8
<uses-sdk android:minSdkVersion="8"/>
I have a EditText control in which I want to type in right-to-left mode.
There is a new property called textDirection which is support in API 17 and higher. But I want to know if there is anyway to make my app supports this property. I heard about some appcompat things but I couldn't figure out if android-support-v7-appcompat has something to do with it.
Will android-support-v7-appcompat solve my problem? cause I tried that and also Adding android.support.v4 to your Android application in IntelliJ IDEA. but none solved my problem.
Is there any other way to do it?

Related

Android Studio XML using marginRight with API 17

I have a RelativeLayout and I am using android:layout_marginEnd="170dp"
and Android Studio is telling me:
To support older version than API 17(project specifies 15) you should
also add
android:layout_marginRight="170dp"
It's not an error, it compiles correctly, but I don't understand this hint. Why should I use marginRight? Why not marginLeft?
Can anyone explain me the secret behind this?
I looked for other answers but I still didn't get it.
Thank you in advance.
android:layout_marginEnd was added in API 17 for better support for right-to-left languages. However, earlier versions of Android prior to API 17 don't recognize this tag, so your need to add android:layout_marginRight as well.

How to use circular progress button library on android 4.0 lower?

I want to use circular-progress-button on android 2.2 or above. But there is a error on Property class that say minimum sdk must be 14.
I don't want to check sdk version and then use or not.
Or even is there any alternative library like this?
If you want to remove that error maybe you need to increase android:minSdkVersion to 14, which means you cant support bellow Android 4.0.
But there is another library with android:minSdkVersion=11. You can use that library too. Here is the link:
FABProgressCircle

Android layout dont change after choosing higher SDK for Actionbar

I have made a programm based on SDK 7. Now I want to add an Actionbar to it. I changed the minSDK to 11 in the Manifest. Isn't that supposed to change the design of the layouts I already have?
Problem is, that I get returned "null" by getActionbar(). I read, that I have to activate the title bar in the OnCreate of the mainactivity. But that does'nt change anything, still "null".
I can see the titlebar, but on SDK 7 it's smaller than on SDK 11. Can't really describe my problem. I just want to use Actionbar on my old written App. But the Layout still looks like in the pic below (left).!
LayoutProblems
Hope someone can help me.
Thanks!
You should also replace the old android.jar with the new one from SDK 11 to get the new GUI. If you are using eclipse for development, just check different Project buid target under Project - Properties - Android.
If you want to use ActionBar in older devices you must use actionbar support library which is provided with the sdk.

How to make Eclipse use older Android API 15

I am learning how to develop Android apps, using Eclipse. New to all of this, and apparently there is a bug that messes up the "Graphical Layout" pane of Android XML files when you add a box of plain-text. I've read solutions saying to change the input type, but I'm not deep enough into Android for it to really make a difference between using API 16 or 15. I am currently using 16, I downloaded 15 today, and am trying to find a way to make Eclipse use the older API. How do I switch Eclipse over to use API 15 instead of 16? (I'd prefer not to uninstall API 16, but if I must, oh well).
Open the manifest file and change the line
<uses-sdk android:minSdkVersion="number-of-version-you-want" />

android 2.2 to 1.6?

I have been developing an android app. I had chosen 2.2 as the version. I have not used any advanced features that are specific to 2.2 or above. I want my app to work with 1.6 and above. What should I do?
Thanks.
You should read this http://developer.android.com/guide/publishing/versioning.html
Complement preview answers.
android make upward compatible your code automatically as much as possible (not always).
But lowering the api level of an app. Can be a task from simple to nightmare to execute, all depends if your code use a lot of specific 2.2 ...
That's means changing API level or android.jar in your project may be far to be enough.
good luck
Open the AndroidManifest.xml file and change to :
<uses-sdk android:minSdkVersion="4"/>
At first you should set android:minSdkVersion="4" in the Android Manifest file.
Next step is to do some testing on an android vm with version 1.6.
Even better would be to test on a real device, but the compiler should give you enough hints what to change in your program.

Categories

Resources