[android-developers] Re: Current mobile connection speed?
My app utilizes both the Twitter and Facebook API. Authentication is very taxing when not connected well. I would like to receive their current speed, and if slow, let them know that authentication will take time. On Dec 13, 4:29 pm, Kristopher Micinski krismicin...@gmail.com wrote: For estimating remaining time of a download? kris On Tue, Dec 13, 2011 at 3:17 PM, Ed Murphy contact.edmur...@gmail.com wrote: How do I determine the current users mobile (not wifi) connection speed? I know how to receive the speed link of the wifi connection (myWifiInfo.getLinkSpeed());), but not the mobile connection. Thanks, any help is appreciated! -- -Ed Murphy contact.edmur...@gmail.com -- 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 -- 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: ListFragment with a custom view hierarchy?
Also to note, I'm using android-support-v4. From the android docs, it clearly states: ListFragment has a default layout that consists of a single list view. However, if you desire, you can customize the fragment layout by returning your own view hierarchy from onCreateView(LayoutInflater, ViewGroup, Bundle). To do this, your view hierarchy must contain a ListView object with the id @android:id/list (or list if it's in code). On Sep 23, 6:18 pm, worked contact.edmur...@gmail.com wrote: I'm attempting to learn fragments and to customize my fragment layout by returning a view hierarchy from onCreateView(LayoutInflater, ViewGroup, Bundle). This inflates my custom view, but behind the default ListView, I see everything at once. Any help is appreciated. Thanks! --MyActivity.java-- public class MyActivity extends FragmentActivity{ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getSupportFragmentManager().findFragmentById(android.R.id.content) == null) { ArrayListFragment list = new ArrayListFragment(); getSupportFragmentManager().beginTransaction().add(android.R.id.content, list).commit(); } } public static class ArrayListFragment extends ListFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //inflates the main.xml resource, but the default ListView is still generated on top of this view. inflater.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.main, container); return super.onCreateView(inflater, container, savedInstanceState); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); String List[] = {Larry, Moe, Curly}; setListAdapter(new ArrayAdapterString(getActivity(), android.R.layout.simple_list_item_1, List)); } } } --main.xml-- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=match_parent android:layout_height=match_parent android:paddingLeft=8dp android:paddingRight=8dp Button android:layout_width=fill_parent android:layout_height=wrap_content android:text=THIS IS A BUTTON / ListView android:id=@android:id/list android:layout_width=match_parent android:layout_height=match_parent android:background=#00FF00 android:layout_weight=1 android:drawSelectorOnTop=false / TextView android:id=@android:id/empty android:layout_width=match_parent android:layout_height=match_parent android:background=#FF android:text=No data / /LinearLayout -- 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: ListFragment with a custom view hierarchy?
Got it! :) I wasn't returning the new view, within the onCreateView method of the ListFragment class. View view = inflater.inflate(R.layout.main, null); return view; On Sep 24, 6:55 pm, worked contact.edmur...@gmail.com wrote: Also to note, I'm using android-support-v4. From the android docs, it clearly states: ListFragment has a default layout that consists of a single list view. However, if you desire, you can customize the fragment layout by returning your own view hierarchy from onCreateView(LayoutInflater, ViewGroup, Bundle). To do this, your view hierarchy must contain a ListView object with the id @android:id/list (or list if it's in code). On Sep 23, 6:18 pm, worked contact.edmur...@gmail.com wrote: I'm attempting to learn fragments and to customize my fragment layout by returning a view hierarchy from onCreateView(LayoutInflater, ViewGroup, Bundle). This inflates my custom view, but behind the default ListView, I see everything at once. Any help is appreciated. Thanks! --MyActivity.java-- public class MyActivity extends FragmentActivity{ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getSupportFragmentManager().findFragmentById(android.R.id.content) == null) { ArrayListFragment list = new ArrayListFragment(); getSupportFragmentManager().beginTransaction().add(android.R.id.content, list).commit(); } } public static class ArrayListFragment extends ListFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //inflates the main.xml resource, but the default ListView is still generated on top of this view. inflater.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.main, container); return super.onCreateView(inflater, container, savedInstanceState); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); String List[] = {Larry, Moe, Curly}; setListAdapter(new ArrayAdapterString(getActivity(), android.R.layout.simple_list_item_1, List)); } } } --main.xml-- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=match_parent android:layout_height=match_parent android:paddingLeft=8dp android:paddingRight=8dp Button android:layout_width=fill_parent android:layout_height=wrap_content android:text=THIS IS A BUTTON / ListView android:id=@android:id/list android:layout_width=match_parent android:layout_height=match_parent android:background=#00FF00 android:layout_weight=1 android:drawSelectorOnTop=false / TextView android:id=@android:id/empty android:layout_width=match_parent android:layout_height=match_parent android:background=#FF android:text=No data / /LinearLayout -- 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: BitmapFactory 's decodeByteArray and decodeStream returns null
His name is Doug, not Donug. Get a clue. -- 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] ListFragment with a custom view hierarchy?
I'm attempting to learn fragments and to customize my fragment layout by returning a view hierarchy from onCreateView(LayoutInflater, ViewGroup, Bundle). This inflates my custom view, but behind the default ListView, I see everything at once. Any help is appreciated. Thanks! --MyActivity.java-- public class MyActivity extends FragmentActivity{ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getSupportFragmentManager().findFragmentById(android.R.id.content) == null) { ArrayListFragment list = new ArrayListFragment(); getSupportFragmentManager().beginTransaction().add(android.R.id.content, list).commit(); } } public static class ArrayListFragment extends ListFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //inflates the main.xml resource, but the default ListView is still generated on top of this view. inflater.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.main, container); return super.onCreateView(inflater, container, savedInstanceState); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); String List[] = {Larry, Moe, Curly}; setListAdapter(new ArrayAdapterString(getActivity(), android.R.layout.simple_list_item_1, List)); } } } --main.xml-- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=match_parent android:layout_height=match_parent android:paddingLeft=8dp android:paddingRight=8dp Button android:layout_width=fill_parent android:layout_height=wrap_content android:text=THIS IS A BUTTON / ListView android:id=@android:id/list android:layout_width=match_parent android:layout_height=match_parent android:background=#00FF00 android:layout_weight=1 android:drawSelectorOnTop=false / TextView android:id=@android:id/empty android:layout_width=match_parent android:layout_height=match_parent android:background=#FF android:text=No data / /LinearLayout -- 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] Loading a url image in a live wallpaper throwing an error.
Im loading an bitmap image inside a live wallpaper activity. It will display in the settings screen but after clicking Set Wall Paper it throws an error. Is this because the run() method runs again when the surface changes, essentially running drawBitmap() again? -- 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] Live WallPaper and TextView
Is there anyway to add a TextView to a Live Wallpaper? I'm using TextPaint to add text directly to the canvas, but I am unable to wrap text if it flows beyond the canvas width. Was thinking a TextView could help with that issue. -- 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