Change height of notification?

by Marc » Wed, 11 Mar 2009 01:12:03 GMT


Sponsored Links
 Is there any way to change the height of the "extended" notification
(i.e. the contentView in the Notification)?   It seems like I get the
standard two lines no matter what...   I'm thinking I've missed
something, but ...

TIA

Marc
--~--~---------~--~----~------------~-------~--~----~



Change height of notification?

by Marc » Wed, 11 Mar 2009 22:56:43 GMT


 bump



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


Sponsored Links


Change height of notification?

by Dianne Hackborn » Thu, 12 Mar 2009 02:12:25 GMT


 No the height is deliberately restricted.






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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



Change height of notification?

by Marc » Thu, 12 Mar 2009 04:28:27 GMT


 Thanks, Dianne!

Marc




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



Change height of notification?

by Marc » Thu, 12 Mar 2009 04:30:38 GMT


 BTW, that should probably be documented somewhere (i.e. that you can
use a custom view, but it's restricted in that way...)

Marc





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



Change height of notification?

by MrSnowflake » Thu, 12 Mar 2009 05:25:35 GMT


 

If you'd do that, you would have to document everything you can't do,
which would be the wrong way around, I believe.




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



Change height of notification?

by Marc » Thu, 12 Mar 2009 05:27:18 GMT


 Can you think of another case in which you can supply a layout to an
API, but the layout is largely ignored?

Marc








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



Change height of notification?

by Dianne Hackborn » Thu, 12 Mar 2009 07:51:11 GMT


 If you create a layout that doesn't fit in a dialog (whose content is some
smaller part of the screen), the exact same thing will happen. :}












-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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



Other Threads

1. Pause Within a loop

I have a loop which draw a bitmap
for(int i=0;i<10;i++){
    //here I draw a bitmap which will move to right a little bit in
each loop
    //I want a pause here so that an animation can be made
}

-- 

2. Why does addHeaderView make a ListActivity forgetful of its position ?

We have an app with a ListActivity and an edit view. Tap on an item in
the ListActivity, see the edit view of that item, hit the Back key,
see the list view. All very ordinary stuff.

But, in this app, the ListActivity does not retain its postion during
that sequence. After hitting Back, the list is always scrolled to the
very top.

Experimenting on the Notepad sample reveals that adding a header view
to the list causes the same problem there. With the header view, the
list is always scrolled to the top after hitting Back on the note
editor. Without the header view, the list retains its scroll position.

Is that behaviour by design, or a consequence of something we are
doing wrong  ? I can't find any way to turn it off, but it doesn't
seem to be obviously desirable.

Thanks,
Richard

Oh - here's the amended Notepad OnCreate:

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setDefaultKeyMode(DEFAULT_KEYS_SHORTCUT);

        // If no data was given in the intent (because we were started
        // as a MAIN activity), then use our default content provider.
        Intent intent = getIntent();
        if (intent.getData() == null) {
            intent.setData(Notes.CONTENT_URI);
        }

        // Inform the list we provide context menus for items
        getListView().setOnCreateContextMenuListener(this);

        // Perform a managed query. The Activity will handle closing
and requerying the cursor
        // when needed.
        Cursor cursor = managedQuery(getIntent().getData(),
PROJECTION, null, null,
                Notes.DEFAULT_SORT_ORDER);



//  >>>>>>>>>>>>>>>>>>>>>>>
//  These two lines stop the list restoring its position
correctly

        View newNoteView =
LayoutInflater.from(this).inflate(R.layout.noteslist_item, null);
        getListView().addHeaderView( newNoteView );

// >>>>>>>>>>>>>>>>>>>>>>>>


        // Used to map notes entries from the database to views
        SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
R.layout.noteslist_item, cursor,
                new String[] { Notes.TITLE }, new int[]
{ android.R.id.text1 });
        setListAdapter(adapter);

     }

-- 

3. How to do animation when click on a bitmap

4. Send key event using native methods or low level classes -- possible solutions ??

5. chatting IRC yuuukk...

6. Mirink

7. Info WiFi Tethering