I am not able to display the rectangles after a certain delay in code.
Here is what I am doing
DashPathEffect dashPath =new DashPathEffect(new float[]{1,0}, 1);
paint.setPathEffect(dashPath);
paint.setStrokeWidth(300);
final int size =300;
canvas.drawLine(0, size ,100 , size, paint);
try {
Thre...
I'd like to display a text with a linebreak in an Alert Message:
private void showAbout() {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
String message = "<b>Rechtlicher Hinweis:</b>\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a dolor sapien. Etiam arcu erat, lobortis sed vestibulum ...
Hi,
I am trying to set the value of a global variable from Android code.
mWebView.loadUrl("javascript:(function() { " +
"loginID = '"+nicu_app.urlSelected+"'; " +
"})()");
but when I load the webpage in a webview and check to see if this variable has been set by the A...
I am using the previewCallback from the camera to try and grab images. Here is the code I am using
private Camera.PreviewCallback mPrevCallback = new Camera.PreviewCallback()
{
public void onPreviewFrame( byte[] data, Camera Cam ) {
Log.d("CombineTestActivity", "Preview started");
Log.d("CombineT...
I have a custom layout that draws a transparent rounded rectangle beneath its children. The problem is when I try to add it to my xml file, it doesn't show up. Also, when I try to add parameters to it (i.e. android:layout_width) the popup shows that none of them are available. The same thing happens to any child views I add. Can anyone h...
Anyone knows how to build errors like that shown in Androffice screenshots on AppBrain (http://www.appbrain.com/app/android.androffice)?
I think that I saw errors like that before. Is that built in Android SDK?
...
I add a RadioButton in my layout.
It is unchecked to begin with. And when I click on it , it becomes checked (as shown in emulator). But when when i click on it again, it does not become unchecked again?
<RadioButton android:checked="false"
android:layout_width="wrap_content"
android:layout_height="wrap_conte...
I want to create a Cursor, which later I will pass via CursorAdapter to AutoCompleteTextView for autocompletion suggestions. The problem is that my SQL statement needs to select 2 different result sets from the same table, just sorted by different criteria. At the same time these result sets must not overlap - otherwise I would have mult...
I have a tabhost with a number of tabs that all need access to the same service through out the life of the application. 'Best practice' suggests that you unbind services when pausing an activity, but this would mean disconnecting from the service, only to reconnect on selection of the next tab, which is daft (not least because my servic...
I defined a splashscreen the following way:
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ExceptionHandler.register(this);
setFullscreen();
splashScreen();
}
private void splashScreen() {
...
I tried using this code to start multiple Activities from a parent activity:
for (int i=0; i<NUM_ACTIVITIES; i++)
{
Intent intent = new Intent(this, MyActivity.class);
startActivity(intent);
}
However, according to my log in MyActivity.onCreate(), only 1 Activity was actually created. Is this behavior expected? If so, what's ...
When using border-radius on my android emulator I am seeing ugliness like this:
Is there anyway to get Android to display rounded corners via -webkit-border-radius in a more pleasing way? Most modern desktop browsers and Mobile Safari seem to antialias their corners, but not Android's renderer.
I'm really hoping I don't have to do t...
I am making a time sheet program where a user inputs his in- and out-punches. I have a ListView that I am populating from an array of calendar objects. I would like each row to show the day and date then on a new line the time, but I only want to display the day and date if it is different from the previous element.
Currently, I am sett...
I have seen few apps having exact same UI when you access the app through stand alone app or through their mobile website. What are the pros and cons of both approaches while developing the app?
Edit - This is a general question. Not necessarily android. Iphone apps are also in similar categories.
...
I'm working on a game that in some ways is similar to Tetris (imagine a 2D array of colored squares that sometimes move around)
I am trying to animate the individual squares so they will smoothly slide down from coordinate to the next. Since I wanted to use Android's built-in tweening feature, the animation has to apply to the whole Vie...
Support App starts activity A, then A starts activity B and finishes itself. After that activity B starts activity C.
Now the stack contains B and C, with C at the top.
Then I click a button in activity C, and want it to clear B and C and start activity A, i.e. I want activity A to be the only activity in the stack. How can I make it?...
I would send two or more files using ACTION_SEND on Android as an excerpt below:
Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
"pokus");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,
"t" );
emailIntent.putExtra(android...
i dont know Google hate me but they didn't give me access to Google Wave back then and now also they didnt give me access to CtDM, is there any way to start developing and working with the framework without getting access from Google ?
...
I'm working on a live wallpaper and I would like to load in my shared_preferences file only when the wallpaper is first set or when the user visits my PreferenceActivty. I'm currently loading in my preferences in onVisibilityChanged() of my WallpaperEngine() class.
Is there a place that makes more sense?
The reason I don't want to loa...
Hi
I'm using a similar codesnippet as shown below to add an application shortcut on the homescreen:
Intent shortcutIntent = new Intent(Intent.ACTION_MAIN);
shortcutIntent.setClassName(this, this.getClass().getName());
shortcutIntent.putExtra(EXTRA_KEY, "ApiDemos Provided This Shortcut");
// Then, set up the container i...