Tiled bitmap gets distorted?

by Ozymandias » Thu, 08 Apr 2010 09:02:17 GMT


Sponsored Links
 I created a bitmap to fill in some empty area on my toolbar. I want it
to tile as it expands.

<?xml version="1.0" encoding="UTF-8"?>
<bitmap xmlns:android=" http://schemas.android.com/apk/res/android" ;
    android:src="@drawable/map_toolbar_background"
    android:gravity="top"
    android:tileMode="repeat" />

My problem is, that placed next to buttons created with the same
background, of the same height, it looks wrong. It gets distorted and
stretched some vertically and is blurrier than the buttons which are
not tiled. If I use the same bitmap just as a android:background, it
looks perfect.

Any ideas what android's doing to my bitmap?

--



Other Threads

1. Taking OFF the "Missed call/s" notification

Hi,

I need to take off the "missed calls" notification issued by the built-
in PHONE application. Since there is no setting in it to NOT display
the notification, I have to do it in my code (unless I missed
somthing... ?)

I thought about launching the built-in call log (thus it will remove
the notification), set a timer (using 'postDelayed' with a
'runnable'), and in the delayed callback launch my own app.

For some reason my own app wont launch from the callback.

This is how I launch the internal call log:

[syntax="java"]    public void StartInternalAfterCallHandler()
    {
        Intent startActivity = new Intent();
        startActivity.setAction
("android.intent.action.VIEW");
        startActivity.addCategory("android.intent.category.DEFAULT");

        startActivity.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT |
                                                   
Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED |
                                                   
//Intent.FLAG_ACTIVITY_CLEAR_TOP |
                                                   
Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);// |
                                                   
//Intent.FLAG_ACTIVITY_SINGLE_TOP |
                                                   
//Intent.FLAG_ACTIVITY_NEW_TASK);

        startActivity.setType("vnd.android.cursor.dir/calls");

        startActivity.setComponent(new ComponentName
("com.android.contacts","com.android.contacts.DialtactsActivity"));

        startActivity(startActivity);
    }
[/syntax]

Then I call:

[syntax="java"]
                        mAsyncAfterCallHandler.postDelayed(mAsyncAfterCallTask, 
10000);
[/syntax]

and in the callback:

[syntax="java"]

SharedPreferences settings = getSharedPreferences(Preferences.NAME,
0);
        SharedPreferences.Editor editor = settings.edit();
        editor.putInt(Preferences.KEY_OPEN_IN_TAB, 0);
                editor.commit();

        Intent startActivity = new Intent();
        startActivity.setAction
("android.intent.action.MAIN");
        startActivity.addCategory("android.intent.category.LAUNCHER");

        startActivity.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT |
                                                   
Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED |
                                                   
//Intent.FLAG_ACTIVITY_CLEAR_TOP |
                                                   
Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS |
                                                   
Intent.FLAG_ACTIVITY_SINGLE_TOP |
                                                   
Intent.FLAG_ACTIVITY_NEW_TASK);

        startActivity.setComponent(new ComponentName
("com.shsh.android.takephone","com.shsh.android.takephone.TAKEphONE"));

        startActivity(startActivity);
[/syntax]

In DDMS I see the 'startActivity' fired, but my app wont launch.

Any help ?

TIA


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

2. Is Google focused on Android?

With announcements like these;

http://googlemobile.blogspot.com/2009/02/google-mobile-app-now-available-on.html

http://www.iphonebuzz.com/google-demo-offline-gmail-webapp-for-iphone-video-demo-186230.php

It really is becoming difficult to see how Android can succeed in the 
long term. One of it's unique selling points was it's integration with 
Google services, and it now seems as though Google themselves are 
eroding that, so what are the reasons people think consumers will buy 
Android devices over other alternatives?

Al.

-- 
======
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


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

3. Could Android power a phone like this...

4. A better way to connect to our own https site

5. More interesting G2 features

6. BBC cover the lack of Android 'phones MWC.....

7. Media Framework Porting into Android