Is it possible to have placeholders in strings.xml for runtime values?

Formatting and Styling Yes, see the following from String Resources: Formatting and Styling If you need to format your strings using String.format(String, Object…), then you can do so by putting your format arguments in the string resource. For example, with the following resource: <string name=”welcome_messages”>Hello, %1$s! You have %2$d new messages.</string> In this example, the … Read more

SHA-1 fingerprint of keystore certificate

Follow this tutorial for creating SHA1 fingerprint for Google Map v2 For Debug mode: keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android for Release mode: keytool -list -v -keystore {keystore_name} -alias {alias_name} example: keytool -list -v -keystore C:\Users\MG\Desktop\test.jks -alias test On windows, when keytool command is not found, Go to your installed … Read more

How to declare global variables in Android?

I wrote this answer back in ’09 when Android was relatively new, and there were many not well established areas in Android development. I have added a long addendum at the bottom of this post, addressing some criticism, and detailing a philosophical disagreement I have with the use of Singletons rather than subclassing Application. Read … Read more

You have not accepted the license agreements of the following SDK components [duplicate]

The way to accept license agreements from the command line has changed. You can use the SDK manager which is located at: $ANDROID_SDK_ROOT/tools/bin e.g on linux: cd ~/Library/Android/sdk/tools/bin/ Run the sdkmanager as follows: ./sdkmanager –licenses e.g on Windows: cd /d “%ANDROID_SDK_ROOT%/tools/bin” Run the sdkmanager as follows: sdkmanager –licenses And accept the licenses you did not … Read more

Update Eclipse with Android development tools v. 23

Google has released ADT v23.0.2. This solved many problems of previous ADT version 23. Step-by-step: Menu Help → Install New Software… For “Work with”, select the Android source https://dl-ssl.google.com/android/eclipse Tick ADT v23.0 for installation, then click “Next” Eclipse will show “Install Remediation Page” since there is conflict with previous version. (If it does not, see … Read more

How to make layout with rounded corners..?

1: Define layout_bg.xml in drawables: <?xml version=”1.0″ encoding=”UTF-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android”> <solid android:color=”#FFFFFF”/> <stroke android:width=”3dp” android:color=”#B1BCBE” /> <corners android:radius=”10dp”/> <padding android:left=”0dp” android:top=”0dp” android:right=”0dp” android:bottom=”0dp” /> </shape> 2: Add layout_bg.xml as background to your layout android:background=”@drawable/layout_bg”

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)