Category Archives: Programming

Alert dialog problem

I can’t compile/run code below:

this.showAlert(„Alert Title”, 0, „Alert Content”, „Confirm Text”, false);

SOLUTION:

The solution is to use the following code in order to create alert dialog:

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(„Alert Title”)
.setMessage(„Alert Content”)
.setCancelable(false)
.setPositiveButton(„Confirm Text”, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// Action handling confirmation, in this case I simply  dismiss alert
dialog.dismiss();
}
});
builder.create().show();

Share this article

  • Blip
  • Delicious
  • Digg
  • Facebook
  • Grono
  • Kciuk
  • NK
  • Twitter
  • Wykop

android:textAlign layout attribute problem

SOLUTION:

Use

android:layout_gravity

attribute instead of

android:textAlign

Share this article

  • Blip
  • Delicious
  • Digg
  • Facebook
  • Grono
  • Kciuk
  • NK
  • Twitter
  • Wykop

Problems with project compilation under RAD 7.0 boundled with WAS 6.1

If You have error log with below codes:

SRVE0203E  SRVE0206E  SRVE0187E  SRVE0210I  SRVE0234I

Then just read carefully given error log (each path, line by line) and find the path which You’ve set incorrectly.


Links:
* IBM developerWorks

Share this article

  • Blip
  • Delicious
  • Digg
  • Facebook
  • Grono
  • Kciuk
  • NK
  • Twitter
  • Wykop

unparsed aapt error s check the console for output

Błąd pojawił się u mnie się po utworzeniu, a następnie usunięciu pliku .xml w projekcie.

Rozwiązanie, które mi pomogło to:

1. Otwieram perspektywę Problems.

2. Zaznaczam błąd o treści „unparsed aapt error s check the console for output”

3. Kasuję go.

4. Przebudowuję cały projekt.

źródło rozwiązania: http://osdir.com/ml/Android-Developers/2010-03/msg03060.html

Share this article

  • Blip
  • Delicious
  • Digg
  • Facebook
  • Grono
  • Kciuk
  • NK
  • Twitter
  • Wykop

Cannot refer to a non-final variable an inner class defined in a different method

PROBLEM:

I had a problem with compiling my Android project. While trying to compile, the error

SOLUTION:

Founded @ anddev.org

Share this article

  • Blip
  • Delicious
  • Digg
  • Facebook
  • Grono
  • Kciuk
  • NK
  • Twitter
  • Wykop

Type Conversion to Dalvik format failed with error 1

Hi,

Currently it’s weekend. Instead of griping on headake after yesterday’s friday evening, I’m working on my engeering thesis… Yes, still…

I’ve been moving my projects directories around my eclipse workspace and find a compilation error mentioned at the topic of this post, while trying to run my app..

I’ve googled a little, and find a hint on this page. In my case the adequate solution was just setting again the android.jar library build path and just cleaning my project.

Share this article

  • Blip
  • Delicious
  • Digg
  • Facebook
  • Grono
  • Kciuk
  • NK
  • Twitter
  • Wykop