Draw a titanium road

this is my code: var win = Ti.UI.createView({ left : 0, top : 0, right : 0, top : 0 }); Ti.UI.currentWindow.add(win); var mapview = Titanium.Map.createView({ mapType : Titanium.Map.STANDARD_TYPE, region : { latitude : 0, longitude : 0, latitudeDelta

User authentication against application engine endpoints

I am creating my first app engine app and having problems with authenticating the users. I have followed the https://cloud.google.com/appengine/docs/python/endpoints/consume_android#making_authenticated_calls - seems a bit magical, that I just "setAc

Android Fragment: How to transmit values ​​in XML

I have a simple fragment with 2 TextView objects. The fragment has the corresponding Java class. How do I pass values from the activity layout XML to the fragment? I want to instantiate the same fragment multiple times with the TextView objects havin

Is there a regex to find the name of the package?

I want to run monkey on game 2048 using adb So, i need package name of 2048, i used adb shell pm list packages -f to list packages. I could not find 2048 in it, but the application is installed on my device. Is there any regex by which i can look for

Passing Intent can not get extra ();

Hi i can't get logged in already in a web page at mine main activity i passed inten to another activity but i can't get an extract. How can i solve it this is mine main activity public class ViewActivity extends Activity { private EditText mTextUserN

Android alignment button by program

I have an Android button on a RelativeLayout which I want to animate. The animation is currently done with a ObjectAnimator to move the button 50dp up and down on a scroll event. The position of the button is currently calculated programmatically wit

How to automatically organize ListView on Android?

I'm very, VERY new to android and I'm making a scheduling app for teachers, students, and parents. I've been watching tutorials on how to make a ListView and I have that all configured blah blah blah. I just needed some help with arranging assignment

Is it an Android library to load images and get http status?

I have an app where I use the library Ion (https://github.com/koush/ion). The problem is I realized that I need to get the http-status when the loading fails. I have a rest-service returning different status depending on what went wrong, and need to

How to set the opacity of a ListView line in Android?

I want to set the opacity of each and every Listview row using android:alpha. I tried doing so but the row doesn't get the transparent background. I have a colorful background of the layout and I want a glass or transparent type of row of the ListVie

Navigation drawer with activity and child fragments

I have a Activity A, a ListFragment P and 2 Fragments Q and R. When the app is launched, A is created, which loads P. Based on what user clicks, it is replaced by Q or R. Now by referencing this tutorial, I have implemented a Navigation Drawer which

How to detect double taps on ListView items in Android?

i want to do some thing like instagram app when user double tab on photo it make like and while he just tab one time it open as full screenI think this answers to Your question as well. Check this link: how to implement double click in android

sharedpreferences null method check

I have seven different activities and i call all data in final activity to calculate it, in all activities i placed a button with failsafe that if edit text is empty no next button is nonclickable. Problem arises now if a user click directly the resu

16-bit, 8-bit PCM audio - getting noise

I implemented the following algorithm to convert PCM 16 bit audio data to 8 bit: if(encoding == AudioFormat.ENCODING_PCM_8BIT){ int len = data.length; data1 = new byte[len/2]; int tempint; for (int k = 0, i=1; i < len; i+=2, k++) { tempint = ((int)da

Android: SharedPreferences How to implement them correctly

I'm trying to store a user entry into an EditText field however when I exit the application it does not appear. So for example a user types in his/her name and then exits the application. When the user returns and launches the Application the users n

end method if empty editText

This is a tip calculator app in Java. If both fields are not filled in, it should show an error message in a TextView, but it just freezes the app... any tips? package tip.calculator; import android.os.Bundle; import android.app.Activity; import andr

display of the progress bar using the thread

I am trying to display a progress bar using threading .. i accpt that i donot have that much concept of threading. here is the code enter code here package com.integrated.mpr; import android.app.Activity; import android.app.ProgressDialog; import and

How to make my connection an asyncTask connection

UPDATE: I found that the easiest way is to use AQuery. I need to get my HttpPost for getting JSON data on another thread and I dont know how to get it all working together. Ive looked at the Painless Threading Blog and still cant get it to work. Belo

call a constructor fails in JNI Android

I am trying to call a constructor from my JNI Android code; but somehow it fails with the following exception.. I am sure I am missing something really small ; but I am not able to figure out ... can anyone please point out ? 02-14 16:56:56.689: W/da

Android: Tablerow multi-line text clipping vertically

I am dynamically adding rows with two columns to a table. One of the columns holds text that will spread across multiple lines. I've added the weight on the layout parameters for the textview so it no longer clipps outside of the screen, but it seems

What is the difference between src and ImageView background?

I am a little puzzled with using src or background for an ImageView. I know the former means the content of this ImageView and the latter means the background of the ImageView. But how to detect which one to use? I don't see the difference.All views

Android: nullpointer when saving images

I'm trying to take an image, optimize it as a 65% jpeg and save it to the phones storage. The code below is working fine for me on my nexus one, but is returning a null pointer exception on the last line. Any idea what I'm doing wrong? Thanks // imag

Vibrate settings on Android 2.2

I'm making a vibrate toggling widget (in fact, its first version is already in the Market) but I'm having some problems with the vibrate settings of Android 2.2. Up to Android 2.1 I have no problem, when I want to disable vibrate I do am.setVibrateSe