Using Pre-Processors/Macros in Eclipse and ADT plugin

by sriram » Sat, 05 Dec 2009 02:44:33 GMT


Sponsored Links
 Hi All,

Trying to build an application using eclipse with ADT plugin on
Android. I have quite a few areas which need customization. In C++ we
used to the do the macro/pre-processor way. Using ant scripts I am
able to achieve this nicely. However for debugging purposes and to
leverage the IDE during development, am interested to know if this is
possible to do it using eclipse for android.

Is this possible at all??

--



Other Threads

1. How to use the sample projects

Hello,

How can I use the Sample projects of Android in my project?

Do I need to import the Sample project (as library) and then extend an
Activity from the Sample project in my project? Or do I need to copy
the code I need into the project?

Thanks in advance!

--~--~---------~--~----~------------~-------~--~----~

2. FILL_AND_STROKE does not seem to work with rectangles!

I haven't posted this as a bug because it is so basic I can only think
that there must be something that I am missing.

Basically the FILL_AND_STROKE style is not respected for rectangles.

Steps to reproduce:
0. Using Cupcake 1.5 (android-sdk-mac_x86-1.5_r3) (problem occurs on
emulator and on Android G1 dev phone)
1. Create a custom view, extending/deriving from View.
2. Create an onDraw method like the following code.

@Override
protected void onDraw(final Canvas canvas)
{
        super.onDraw(canvas);

        final Paint paint = new Paint();
        paint.setAntiAlias(true);
        paint.setColor(android.graphics.Color.BLUE);
        paint.setStyle(Paint.Style.FILL_AND_STROKE);
        canvas.drawRect(0, 0, 100, 100, paint);
        canvas.drawCircle(110 + 50, 110 + 50, 50, paint);
}

What you will see is a rectangle that is stroked but NOT filled and a
circle that is stroked AND filled appropriately.

Since this is a basic drawing operation I can only surmise that there
must be an additional step to drawing rectangles that is not
documented. I cannot seem to find any reference to this problem as an
open issue or posted anywhere.

So would someone mind pointing me at the problem? Or is it a bug that
has just somehow slipped through?

Thanks in advance for your response,

Keith

--~--~---------~--~----~------------~-------~--~----~

3. notify on incoming email

4. wifi RA certificate issue

5. How to run GPS based application (WikiTude) in Android SDK Emulator?

6. Toronto Android Users Group

7. Issue with adapter redrawing when GridView Item