[android-developers] Re: Override default icons of BaseExpandableListAdapter
Yes, I tried to use ExpandableListView.setIndicatorBounds but this affects the stretching only on the x-axis. I couldn't find any function to do stretching on the y-axis. Anyway, there is always the dirty trick of designing your icon accordingly, but if you care about clear design, choosing this approach really hurts. I don't know how many of the messages in this forum the guys at Google read, but I would like to write that the Android SDK sometimes sucks big time... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Override default icons of BaseExpandableListAdapter
Actually ExpandableListView.setGroupIndicator doesn't do the job either, because it changes the icon for all groups. If you want to override the icons for minimized and maximized states, the maximized group icon will be different than the rest of the groups. It's not possible to implement this using ExpandableListView.setGroupIndicator. Such a basic thing appears to be rocket science! It's unbelievable... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Override default icons of BaseExpandableListAdapter
Thanks that'll help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Override default icons of BaseExpandableListAdapter
Hi TreKing, The ExpandableListView.setGroupIndicator does the job indeed, except it stretches the new icon. Is there a way to disable this stretching? I find it a bit strange that stretching is the default behavior instead of displaying an icon in it's original size. Any feedback would be very helpful. -Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Override default icons of BaseExpandableListAdapter
Hello, I'm trying to override the default icons of an BaseExpandableListAdapter in a class which inherits from BaseExpandableListAdapter. What would be a decent way of doing this? Such a basic thing doesn't seem to be straightforward. Thank you in advance, -Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to hide label on screen?
Hi, Suppose that you create a HelloWorld application under Eclipse. Then in res/values/strings.xml the following entry is created: string name=app_nameHello, Android/string Now, when you launch the HelloWorld application you see the label Hello, Android on top of the screen. I want to hide this label. What is the way of doing this? Thank you in advance and kind regards, -Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to hide label on screen?
Hi Mark, Thank you for the message. Yes, it works indeed. Regards, -Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ListView: How to Create a Complex Row?
Hi, I would like to create complex rows in a ListView (all of the rows will have the same appearance, except the displayed text message of course). Following is, from where I would like to start. I want each row of the listview contain two lines. The second line will display two text messages; the first one will be bold and the second one will be italic. Desired listview row: Text1 Text21 Text22 I want Text21 to be bold and Text 22 to be italic. Below I give the custom layout which I created and the code which extends ArrayAdapter by implementing ComplexRowAdapter. The problem is that the GUI appears distorted (I indicated in the code which lines cause the distortion). Do you have any suggestions what might be going wrong here? The custome layout file (complex_row.xml) ?xml version=1.0 encoding=utf-8? TwoLineListItem xmlns:android=http://schemas.android.com/apk/res/ android android:paddingTop=2dip android:paddingBottom=2dip android:layout_width=fill_parent android:layout_height=wrap_content android:minHeight=?android:attr/ listPreferredItemHeight android:mode=twoLine TextView android:id=@+id/text1 android:layout_width=fill_parent android:layout_height=wrap_content android:layout_marginLeft=6dip android:layout_marginTop=6dip android:textAppearance=?android:attr/ textAppearanceLarge / LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content android:layout_below=@id/text1 android:layout_alignLeft=@id/text1 android:orientation=horizontal TextView android:id=@+id/text21 android:layout_width=fill_parent android:layout_height=wrap_content android:textStyle=bold android:textAppearance=?android:attr/ textAppearanceSmall / TextView android:id=@+id/text22 android:layout_width=fill_parent android:layout_height=wrap_content android:layout_toRightOf=@id/text21 android:textStyle=italic android:textAppearance=?android:attr/ textAppearanceSmall / /LinearLayout /TwoLineListItem The corresponding source code: package com.example.complexrows; import android.app.Activity; import android.app.ListActivity; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; public class HelloAndroid extends ListActivity { static final String[] ListViewItems = new String[] { Sometext1, Sometext2, Sometext3, Sometext4 }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setListAdapter(new ComplexRowAdapter(this)); getListView().setTextFilterEnabled(true); } class ComplexRowAdapter extends ArrayAdapter { Activity context; ComplexRowAdapter(Activity context) { super(context, R.layout.complex_row, ListViewItems); this.context=context; } public View getView(int position, View convertView, ViewGroup parent) { View row = convertView; if (null == row) { LayoutInflater inflater = context.getLayoutInflater(); row = inflater.inflate(R.layout.complex_row, null); } TextView label=(TextView)row.findViewById(R.id.text1); label.setText(MenuItems[position]); label=(TextView)row.findViewById(R.id.text21); label.setText(MenuItems[position]); // !These lines distort the GUI! label=(TextView)row.findViewById(R.id.text22); label.setText(MenuItems[position]); return(row); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to query the Frequently Called list?
Hi, I'm trying to query the frequently called list; in other words the list which appears under the Favorites tab of Contacts. Does anybody know how to query this list? Couldn't find any explanation or any examples so far. Any information is greatly appreciated. Thanks in advance, -Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Query the List of Favorite Contacts
Hi, I'm trying to query the list of favorite contacts. I use the line below: Cursor cur = this.getContentResolver().query(People.CONTENT_URI, null, People.STARRED + =?, new String[] { 1 }, null); However, this doesn't work because NULL data is returned, even though my list of favorite contacts is not empty. Is there a way to query the list of favorite contacts? Thanks in advance, Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem with ListActivity in TabActivity
There was something wrong in the manifest file and this was causing the problem. The code which I originally posted works now. Mark and TreKing thank you for your replies. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem with ListActivity in TabActivity
Hi Mark, Thank you for the information. I'd rather use ListActivity. Probably I'm missing something simple but couldn't catch it yet. Below please find the stack trace at the moment of the crash. Any help would be greatly appreciated. Thank you in advance. -Ali My_Apps [Android Application] DalvikVM[localhost:8613] Thread[3 main] (Suspended) ActivityThread.performLaunchActivity(ActivityThread $ActivityRecord) line: 2266 ActivityThread.handleLaunchActivity(ActivityThread $ActivityRecord) line: 2284 ActivityThread.access$1800(ActivityThread, ActivityThread $ActivityRecord) line: 112 ActivityThread$H.handleMessage(Message) line: 1692 ActivityThread$H(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 3948 Method.invokeNative(Object, Object[], Class[], Class[], Class, int, boolean) line: not available[native method] Method.invoke(Object, Object...) line: 521 ZygoteInit$MethodAndArgsCaller.run() line: 782 ZygoteInit.main(String[]) line: 540 NativeStart.main(String[]) line: not available [native method] Thread [15 Binder Thread #3] (Running) Thread [13 Binder Thread #2] (Running) Thread [11 Binder Thread #1] (Running) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem with ListActivity in TabActivity
Hi, I have issues with displaying a ListActivity in a TabActivity. The super simple code below causes a crash. Any ideas what is going wrong here and how can I fix it? public class MyTabView extends TabActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TabHost mTabHost = getTabHost(); mTabHost.addTab(mTabHost.newTabSpec(my_tab).setIndicator(Contacts).setContent(new Intent(this, Contacts.class))); } } public class Contacts extends ListActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Empty for the time being... } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Synchronize an AVD with ANdroid phone
Is it possible to synchronize an AVD with an Android phone? Like, I would like to upload to an AVD my contacts list, calllog, SMS messages etc. Such an upload, if possible will be very helpful, because otherwise I have to create artificial data on the AVD. Thank you in advance -Ali -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en