I have implemented a NavigationDrawer in my application. I would like to know how I can add a vertical shadow effect which is below the main Fragment, similar to the picture below. I have one image on my drawable with the shadow image. It’s called “drawer_shadow.9” but I don’t know how…
Tag: android
Setting SDK Location in Netbeans
I’m having some trouble setting the Android SDK Location in Netbeans. I have installed the SDK and even run a virtual device in it, but for some reason Netbeans is not recognizing the SDK. Here is the location of my SDK: And when I have this entered in Netbeans: The ‘OK’ or ‘Apply̵…
Android – How do I detect if user has chosen to share to Facebook or twitter using intent?
I’ve created an application which shares to facebook, twitter etc. But I want to perform different functions dependent on who the user is sharing to, for instance if the user is sharing to Facebook do one thing but if the user shares to twitter do another. How do I do this? My code so far is below: Furt…
How to make app wait and then start activity or go back?
I want my activity to show a screen for 3 seconds, then go back to previous screen. But when i use But unfortunately, this does not work. This doesent show the activity waits 3 seconds and goes back. However, i want it to show its contents before going back. How can i do it ? Answer You should remove this
How can I change option menu in different fragments?
I have a Fragment with menu: I would like to change menu but it doesn’t work and keep the old action menu Fragment B is equals like above with different inflate XML menu. EDITED: Can be useful to use different menu layout for different fragments and 1 menu layout for main activity and differents id Answ…
android countdowntimer tick is not accurate
I am using a countdown timer for audio notification… and it’s not accurate from the start… using initial parameters I can see in the log that the initial countdown is correctly set to 180000 but the next one should be 120000 and it’s set to 119945 !!! This is quite annoying as the audi…
Android: Cannot perform this operation because the connection pool has been closed
I was reading through StackOverflow about this question and I still haven’t found a solution. I notice that sometimes, my app throws this error: I have a file called DatabaseHelper.java using this approach to get an instance of it: Then I have methods like this one (that it crashed in the line cursor.mo…
ANDROID: Converting inputted numbers to words
Our assignment states that we write a program that will input a number up to 6 digits and will convert the numbers into words.. ex: 123 = one hundred twenty three. I AM CLUELESS! Then I found this site http://www.rgagnon.com/javadetails/java-0426.html but I don’t really understand how to convert it into…
How to increment time every second in Libgdx
I try to add time to my game that will increment every second. How to fix that? I add my code below as your note, delta is Gdx.graphics.getDeltaTime(). ‘time’ is string. but looks like the time increment slowly. means that when time already run about 1,5 sec, ‘time’ still increase 1. I…
Android – Keep user logged in
I’m trying to make a login with PHP and MySQLi for Android. What I don’t understand is how to keep the user logged in? I saw a simple tutorial where someone used SQLite to safe information but I’m not aware if that is really secure way. How should I save the user information to keep the user…