Re: [android-developers] Re: Activity Back Stack and OutOfMemoryError
2014-05-11 14:00 GMT+02:00 Piren gpi...@gmail.com: Android has this particular annoying and weird behavior: Once the heap inflates to a certain size, no matter how much of it is actually used, you can no longer allocate files that are larger than the remaining memory. my guess, you're there. you should make sure your previous activities use as little memory as possible and make it a habit of unloading memory which might not be necessary once activities are changed. This is especially true in apps that store large bitmaps and even more noticeable if you also have lots of small objects (memory fragmentation + large bitmaps = OOM exceptions) I have inspected the code as Kostya mentioned, and i haven't seen anything what looks like a leak, all the memory was released after causing a gc manually. And i carefully checked every activity and its fragments. I only come to the conclusion that what you said must be the case i have no other answer for that. So will change the behavior of opening lots of activities. But in future it should be wise considered in the concept. Thank you for all readers and who respond. Daniel -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Activity Back Stack and OutOfMemoryError
2014-05-09 0:12 GMT+02:00 Kostya Vasilyev kmans...@gmail.com: Are you absolutely sure that your code does not leak memory? How to be absolutely sure. :-) Just kidding. Have you tried using Eclipse MAT and putting the app through the usual paces, like rotating the screen, pausing / restarting, etc.? This i have done: * app started, before killed * dump hprof and load with mat (leak suspects) * rotate, rotate, rotate... * dump hprof again load with mat (leak suspects) i compared the mat reports with the suspects and i see no differences in the leak suspects report. Which sould differ in the occupied size when i am not wrong? You'd mentioned the app being heavy on image processing -- is your memory allocation strategy based on how much memory your app's process gets? You can use ActivityManager#getMemoryClass for that. Actually i am aware of this complicated and consequences so i use the universal image loader which is configured to scale the images exact in the bitmap which cost cpu time, but preserves memory. It's too bad that your log does not have any memory allocation data. I'd consider implementing a crash handler that logs to a file, recording things like: Debug.getNativeHeapAllocatedSize() Debug.getNativeHeapFreeSize() Runtime.getRuntime().maxMemory() Runtime.getRuntime().totalMemory() Runtime.getRuntime().freeMemory() ActivityManager.getMemoryClass() I am new to the memory thing, and it doesn't happen a lot. It happens mostly on a rare ressource device. But question again starting lots of activities where you can go back should not be the issue? If the activity itself isn't leaking anything it can be gc'ed? The backstack just fire the intent 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Activity Back Stack and OutOfMemoryError
2014-05-09 15:53 GMT+02:00 Kostya Vasilyev kmans...@gmail.com: 2014-05-09 16:59 GMT+04:00 Daniel Rindt daniel.ri...@gmail.com: 2014-05-09 0:12 GMT+02:00 Kostya Vasilyev kmans...@gmail.com: Are you absolutely sure that your code does not leak memory? How to be absolutely sure. :-) Just kidding. Have you tried using Eclipse MAT and putting the app through the usual paces, like rotating the screen, pausing / restarting, etc.? This i have done: * app started, before killed * dump hprof and load with mat (leak suspects) * rotate, rotate, rotate... * dump hprof again load with mat (leak suspects) i compared the mat reports with the suspects and i see no differences in the leak suspects report. Which sould differ in the occupied size when i am not wrong? Well, personally, I usually use the object histogram at the starting point -- filtered by my app's package. When I see something that looks strange, I right click on a object class and do merge shortest paths to object roots to investigate. That's just me -- I've not used leak suspects -- but maybe you'd be able to see something interesting in the histogram? I tried what you said, but please tell me what i can recognize as strange? I don't find a definitve guide to find a leak. I can't really see any weird thing. The only conclusion i come to is that every new opened activity consumes more heap and i have the feeling that this causes the oom. You'd mentioned the app being heavy on image processing -- is your memory allocation strategy based on how much memory your app's process gets? You can use ActivityManager#getMemoryClass for that. Actually i am aware of this complicated and consequences so i use the universal image loader which is configured to scale the images exact in the bitmap which cost cpu time, but preserves memory. That's a well known library, but I guess it still needs to be configured in a way that makes sense for your app's flow. I've set it for now just to preserve memory. It's too bad that your log does not have any memory allocation data. I'd consider implementing a crash handler that logs to a file, recording things like: Debug.getNativeHeapAllocatedSize() Debug.getNativeHeapFreeSize() Runtime.getRuntime().maxMemory() Runtime.getRuntime().totalMemory() Runtime.getRuntime().freeMemory() ActivityManager.getMemoryClass() I am new to the memory thing, and it doesn't happen a lot. It happens mostly on a rare ressource device. You can create an emulator image with lowered per-process memory quotas. Don't know if it actually works the way it's supposed to, but the setting is there. But question again starting lots of activities where you can go back should not be the issue? If the activity itself isn't leaking anything it can be gc'ed? The backstack just fire the intent again? There have been a few discussions on this list about it -- with no clear answer that I can remember. This should be fairly easy to verify in the debugger. Maybe you can use the lifecycle callbacks (onStop / onStart) to release some memory? You mean set collections to null? -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Activity Back Stack and OutOfMemoryError
Hello, in the application we open a chooser for selecting photos. I got frequently crashes mostly from sony by doing this which says: OutOfMemoryError which raises by showing the bitmaps. The stacktrace which the system creates doesn't mention a class of our code which confuses me a bit. My assumption is that our app can open lots of activities and by opening the image choose there is not much space left and the crash happen. So far i read i shouldn't care about do finish(); and activity they can remain in the activity backstack. It would be great to get a bit more clued. Here is the stacktrace i got: Package: com.viselabs.aquariummanager Version Code: 34 Version Name: 0.16.34.g3cc9d12 Android: 4.3 Manufacturer: samsung Model: SPH-L710 Date: Thu May 08 09:13:04 EDT 2014 java.lang.RuntimeException: Unable to start activity ComponentInfo{android/com.android.internal.app.ChooserActivity}: android.view.InflateException: Binary XML file line #26: Error inflating class unknown at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359) at android.app.ActivityThread.access$700(ActivityThread.java:165) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5455) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #26: Error inflating class unknown at android.view.LayoutInflater.createView(LayoutInflater.java:626) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700) at android.view.LayoutInflater.rInflate(LayoutInflater.java:761) at android.view.LayoutInflater.rInflate(LayoutInflater.java:769) at android.view.LayoutInflater.inflate(LayoutInflater.java:498) at android.view.LayoutInflater.inflate(LayoutInflater.java:398) at android.view.LayoutInflater.inflate(LayoutInflater.java:354) at com.android.internal.app.ResolverActivity.onCreate(ResolverActivity.java:210) at com.android.internal.app.ChooserActivity.onCreate(ChooserActivity.java:69) at android.app.Activity.performCreate(Activity.java:5372) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267) ... 11 more Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:417) at android.view.LayoutInflater.createView(LayoutInflater.java:600) ... 24 more Caused by: java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:832) at android.content.res.Resources.loadDrawable(Resources.java:2988) at android.content.res.Resources.getDrawable(Resources.java:1558) at android.widget.EdgeEffect.init(EdgeEffect.java:148) at android.widget.AbsListView.setOverScrollMode(AbsListView.java:1220) at android.view.View.init(View.java:3458) at android.view.View.init(View.java:3528) at android.view.ViewGroup.init(ViewGroup.java:475) at android.widget.AdapterView.init(AdapterView.java:236) at android.widget.AbsListView.init(AbsListView.java:1105) at android.widget.GridView.init(GridView.java:110) at android.widget.GridView.init(GridView.java:106) ... 27 more It would be nice to get some information about what are you think about. Thank you for your attention and support. Daniel -- 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
Re: [android-developers] Activity Back Stack and OutOfMemoryError
2014-05-08 17:52 GMT+02:00 Krishna Mahadik krishna.maha...@gmail.com: Increase memory allocated to process bitmap. Chunk of code will be more helpful to understand what problem exactly you are facing. Thanks for your reply, have a look where the error is happen: java.lang.RuntimeException: Unable to start activity ComponentInfo{android/com.android.internal.app.ChooserActivity}: android.view.InflateException: Binary XML file line #26: Error inflating class unknown This is not my code. It seems the process from the app consumes much memory and by invoking the chooser its not able to inflate the layout. The resulting question is what can i do to prevent such errors? -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] DialogFragment created twice after orientation change
Am Donnerstag, 30. Januar 2014 00:01:56 UTC+1 schrieb TreKing: You are creating a new Dialog in your onCreate method. onCreate gets called both the first time the app is run (with savedInstanceState set to null) and after an orientation (configuration) change, with savedInstanceState set to the last saved state Bundle. In the latter case, the system also automatically re-creates the original dialog fragment as part of the lifecycle. Therefore, the system is recreating the dialog for you and you are additionally creating a new instance. You explicitly check if the dialog already exists in the fragment manager, which would be the original instance with the text before orientation change, and you replace it with the new instance, which would be brand new and not have the text saved from the original. The simple solution here is to remove checking if the dialog already exists and just only create the dialog if savedInstanceState is null. Thanks for your message and efforts with my problem. I am really thankful for that. I've in this example neglect that onCreate() behave as you mentioned. I've adjusted to code and shows like this just for testing: public class DialogTestActivity extends Activity implements OnClickListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dialog_test); ((Button) findViewById(R.id.button1)).setOnClickListener(this); } @Override public void onClick(View v) { AskForNameDialog d = AskForNameDialog.newInstance(new OnNameSetListener() { @Override public void onNameSet(AskForNameDialog dialog, String name) { } }, getString(R.string.enter_manufacturers_name)); d.show(getFragmentManager(), dialog); } } added a simple button (layout omitted here just linear with a button) and this should open the dialog. It behaves exactly in the same manner as already mentioned. I have tried really all the stuff i found belonging to my problem, read the android developer blog about this, and all this really not solve this. Thank you for your help Daniel -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] DialogFragment created twice after orientation change
Dear readers, i experienced a double call to onCreateDialog also to onCreateView in my project. here is my activity code: public class DialogTestActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AskForNameDialog d = AskForNameDialog.newInstance(new OnNameSetListener() { @Override public void onNameSet(AskForNameDialog dialog, String name) { } }, getString(R.string.enter_manufacturers_name)); this.showMyDialog(d); } private void showMyDialog(DialogFragment d) { FragmentTransaction ft = getFragmentManager().beginTransaction(); Fragment prev = getFragmentManager().findFragmentByTag(dialog); if (prev != null) { ft.remove(prev); } ft.addToBackStack(null); d.show(ft, dialog); } } here is the dialog: public class AskForNameDialog extends DialogFragment { protected static final String TAG = AskForNameDialog.class.getSimpleName(); private OnNameSetListener mCallback; private String mMessage; public AskForNameDialog() { } private AskForNameDialog(OnNameSetListener listener, String message) { mCallback = listener; mMessage = message; } public static AskForNameDialog newInstance(OnNameSetListener listener, String message) { AskForNameDialog f = new AskForNameDialog(listener, message); Bundle b = new Bundle(); b.putBoolean(blah, false); f.setArguments(b); return f; } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { int padd = convertDpToPixel(20, getActivity()); final EditText txt = new EditText(getActivity()); txt.setSingleLine(); final AlertDialog ad = new AlertDialog.Builder(getActivity()) .setTitle(mMessage) .setPositiveButton(android.R.string.ok, null) .create(); ad.setView(txt, padd, padd, padd, padd); ad.setOnShowListener(new DialogInterface.OnShowListener() { @Override public void onShow(DialogInterface dialog) { Button b = ad.getButton(AlertDialog.BUTTON_POSITIVE); b.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (!FormUtils.isValid(txt, 3, 50, R.string.input_error_min_max_letters)) return; mCallback.onNameSet(AskForNameDialog.this, txt.getText().toString()); dismiss(); } }); } }); return ad; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setCancelable(false); } public static int convertDpToPixel(float dp, Context context) { Resources resources = context.getResources(); DisplayMetrics metrics = resources.getDisplayMetrics(); return (int) (dp * (metrics.densityDpi / 160)); } public interface OnNameSetListener { public void onNameSet(AskForNameDialog dialog, String name); } } I'm using exactly the same code in another project and there the dialog is working well. Explaining what happened: 1. Dialog properly appears with the input field 2. enter some letters in the EditText view 3. do an orientation change 4. the dialog appear but without the previous entered text In the debugger i put a breakpoint on onCreateDialog() and see that it called first containing savedInstanceState with data and immediately after the the method is called again with savedInstanceState=null. This happens on every api level. I appreciate your feedback and thanks in advance for your support! Daniel -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: How to animate a bar which grows in height
Thans Nobu, but after STFU and RTFM i don't get it. :-( Someone is willing to help me paid? -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] How to animate a bar which grows in height
Hello, i try to let grow a bar which actually is a simple View with a color in hight for animating a voting display. My code looks like this: ScaleAnimation anim = new ScaleAnimation(1, 1, 0, 1, 0, 0); anim.setDuration(5000); anim.setFillEnabled(true); anim.setFillAfter(true); mQ1.startAnimation(anim); mQ1 is a View. But when the animation starts its top down animated instead of bottom up. So i played with the parameters also and got lots of different effects. Maybe its not possible to achieve this? Or i have to rotate it before? Thanks for reading Daniel -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: How to animate a bar which grows in height
2013/8/15 Nobu Games dev.nobu.ga...@gmail.com Hi Daniel, can you post the layout in which these bars are embedded? You may be able to solve it with some bottom gravity setting in the parent container layout Hey, cool thats what i haven't played with. Here is the layout: RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent android:layout_height=match_parent android:orientation=vertical View android:id=@+id/reference_height android:layout_width=50dp android:layout_height=200dp android:layout_alignParentBottom=true android:layout_alignParentLeft=true android:layout_marginBottom=75dp android:layout_marginLeft=20dp android:background=@android:color/black / View android:id=@+id/q1 android:layout_width=150dp android:layout_height=200dp android:layout_alignParentBottom=true android:layout_alignParentLeft=true android:layout_marginBottom=75dp android:layout_marginLeft=84dp android:background=@android:color/darker_gray / /RelativeLayout Thanks for your friendly support. Daniel -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Custom fonts and android-gradle build
Hai, i use the latest sdk build tools and gradle plugin 0.4.2. for building an app which uses custom ttf fonts. When i build the app with eclipse doesn't matter if a release build or a debug the font is properly shown. If i use the version build by gradle then the font let crashes the app frequently. The solution i have tried is just to catch the java.lang.RuntimeException: native typeface cannot be made. But then the font is not applied on some views. Its a very volatile thing. Maybe someone can clue me? Thanks for reading! Daniel -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] detect intrumentation
Hello, i would like to know how to find out if the app is running in an intrumentation runner? Thanks Daniel -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] revision 17 of the Android SDK Tools NoClassDefFoundError
Am Mittwoch, 22. Mai 2013 05:11:16 UTC+2 schrieb TreKing: On Tue, May 21, 2013 at 3:25 PM, Daniel Rindt daniel...@gmail.comjavascript: wrote: So i don't know to investigate that error deeper and need assistance for that. Do a Google search for the exact phrase you used for this topic. I just write here, when i am out of ideas and this is mostly after some hours of googling. My browser shows that i already read all results from the query above. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] revision 17 of the Android SDK Tools NoClassDefFoundError
Am Mittwoch, 22. Mai 2013 12:26:41 UTC+2 schrieb Kostya Vasilyev: I ran into the same, with a class defined in the application's project (not as a library). Fixed by marking Android Private Libraries as exported (Project props - Java build path - Order and export)... even though the code in question was defined in a .java file under src, not a library. However, this class of mine is derived from a class that comes from a .jar under libs, so maybe it makes sense (or not)... I'd say, try the export, won't hurt :) It fixes the problem. Thank you very much. Daniel -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] revision 17 of the Android SDK Tools NoClassDefFoundError
Hi, after upgrading to revision 17 of the sdk tools i got in my project NoClassDefFoundError. The missed class is not in a library in that case. They reside in the same package as the class initially started from launcher. And this is found well. I used dexdump to ensure this class is really in dex file and i found it. So i don't know to investigate that error deeper and need assistance for that. Thanks in advance Daniel -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] gradle build with custom views
Hello again, i placed just for testing a view pager in the layout.xml and that is found by the inflater. It seems that here is something wrong with package stuff. But i don't get clued. The build runs inside eclipse but not the gradle builded apk. Really weird. Daniel -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] gradle build with custom views
Hello, i just experienced a InflateException when i start the app which gradle builds before. The layouts use custom views: com.viselabs.core.ui.FontTextView android:id=@+id/tv1 ... / The code is working fine when build with eclipse. Someone can confirm this? The result of the layout.xml from gradle build is different to eclipse built ones. Maybe aapt can get some special params to properly build the files? Thanks in advance Daniel -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] gradle build with custom views
2013/4/24 Tor Norbye tnor...@google.com: How are the two layout files different? I opened the apk and extracted the binary xml's and they are different. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Problem with gradle build version 0.3 and signing (signingConfigs)
2013/3/1 Jonathan S xfsuno...@gmail.com Okay, I fixed this. signingConfigs { myConfig { storeFile file(signingStoreLocation) storePassword signingStorePassword keyAlias signingKeyAlias keyPassword signingKeyPassword } } buildTypes { release { signingConfig signingConfigs.myConfig } } Thank you, that fixes my issue. Daniel -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Problem with gradle build version 0.3 and signing (signingConfigs)
Hello, using the builder version 0.3 and try to sign my app. Those values are present in ~/.gradle/gradle.properties and worked fine in version 0.2. Here is my definition: apply plugin: 'android' def getCurrentVersionCodeOrBuildNumber() { ext.v = System.getenv().BUILD_NUMBER?.toInteger() if (ext.v == -1 || ext.v == null) ext.v = 1 return ext.v } android { compileSdkVersion 17 sourceSets { main { manifest { srcFile AndroidManifest.xml } res { srcDir res } java { srcDirs = ['src', 'src-gen'] } } } defaultConfig { versionCode getCurrentVersionCodeOrBuildNumber() } signingConfigs { release { storeLocation project.ext.androidSigningStoreLocation storePassword project.ext.androidSigningStorePassword keyAlias project.ext.androidSigningKeyAlias keyPassword project.ext.androidSigningKeyPassword } } buildTypes { release { signingConfig signingConfigs.release } } } dependencies { compile ':android-support:v4' compile ':greenDAO:' compile ':gson:2.2.2' compile project(':ZXing') } when i do a gradle assembleDebug i got: A problem occurred evaluating project ':ProjectC'. Could not find method storeLocation() for arguments [/home/drindt/.android/debug.keystore] on SigningConfigDsl_Decorated{name=release, storeFile=null, storePassword=null, keyAlias=null, keyPassword=null, storeType=null}. The keystore file exits and its accessible with the credentials. Thank you for suggestions and help. Daniel -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: gradle and libs
You already have dependencies { compile fileTree(dir: 'libs', include: '*.jar') } you have to put all *.jar file inside the libs directory. If any *.jar file outside of the libs folder wouldn't be compiled. The documentation says that compile is only using the classes on compile time. And thats here the case, when i start up the resulting apk it crashes because the classes are not in. When i switch from compile to runtime and gradle tells me then that AndroidManifest.xml is not present. But it is. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] gradle and libs
Hello, my android lib makes use of some other libs which reside in /libs as usual in android projects. My gradle file looks like this: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.2' } } apply plugin: 'android-library' dependencies { compile fileTree(dir: 'libs', include: '*.jar') } android { allprojects { sourceCompatibility = 1.6 targetCompatibility = 1.6 } defaultConfig { minSdkVersion = 8 signingStoreLocation = $androidSigningStoreLocation signingStorePassword = $androidSigningStorePassword signingKeyAlias = $androidSigningKeyAlias signingKeyPassword = $androidSigningKeyPassword } target = 'android-17' sourceSets { main { manifest { srcFile AndroidManifest.xml } java { srcDir src exclude test/** } res { srcDir res } } } } The build says successful when i deploy the apk the first run raises java.lang.NoClassDefFoundError: com.omniture.AppMeasurement. Thats one class in the mentioned jar files in the lib folder. Thanks for all help and suggestions Daniel -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Application not Visible on emulator Screeen
Am Dienstag, 19. Februar 2013 11:43:17 UTC+1 schrieb Sagar Rout: Hey Bob, I already tried that option i mean that application is not visible on the application list on the home screen I doubt that an application can direct appear on the home screen without user interaction. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Multiple HTTP requests
*HttpConnectionParams.setConnectionTimeout (httpParameters, 3);* *HttpConnectionParams.setSoTimeout (httpParameters, 3);* I did a test using apache jmetter sending multiple requests to this server and had no problems. This can be a limitation of the network? SO? tried this: http://developer.android.com/reference/java/net/HttpURLConnection.html If you experience a different behavior then maybe you are lucky. On the other hand you can implement an Executer http://developer.android.com/reference/java/util/concurrent/ExecutorService.html and limit there the amount of concurrent request regarding to the connection type. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: gradle and libs
Am Dienstag, 19. Februar 2013 16:13:32 UTC+1 schrieb bob: You say lib in one place and libs in another. Make sure you pick one name and use it everywhere. a qualified answer would be much better than this answer to a totally clear situation what's meant! -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: gradle and libs
Am Dienstag, 19. Februar 2013 19:52:59 UTC+1 schrieb Jonathan S: You already have dependencies { compile fileTree(dir: 'libs', include: '*.jar') } you have to put all *.jar file inside the libs directory. If any *.jar file outside of the libs folder wouldn't be compiled. So far i think i have understand this. :-) But please take a look here: [drindt@localhost gb1.core]$ ls -l insgesamt 40 -rw-rw-r--. 1 drindt drindt 364 19. Feb 16:21 AndroidManifest.xml drwxrwxr-x. 2 drindt drindt 4096 27. Nov 10:20 assets drwxrwxr-x. 4 drindt drindt 4096 19. Feb 17:27 bin -rw-rw-r--. 1 drindt drindt 939 19. Feb 16:21 build.gradle drwxrwxr-x. 3 drindt drindt 4096 19. Feb 17:28 gen drwxrwxr-x. 2 drindt drindt 4096 19. Feb 16:21 libs -rw-rw-r--. 1 drindt drindt 781 15. Jan 09:33 proguard-project.txt -rw-rw-r--. 1 drindt drindt 583 19. Feb 16:21 project.properties drwxrwxr-x. 10 drindt drindt 4096 19. Feb 16:21 res drwxrwxr-x. 3 drindt drindt 4096 27. Nov 10:20 src [drindt@localhost gb1.core]$ ls -la libs/ insgesamt 388 drwxrwxr-x. 2 drindt drindt 4096 19. Feb 16:21 . drwxrwxr-x. 9 drindt drindt 4096 19. Feb 16:21 .. -rw-rw-r--. 1 drindt drindt 337562 19. Feb 16:21 android-support-v4.jar -rw-rw-r--. 1 drindt drindt 48313 20. Dez 00:13 AppMeasurement_Android.jar all jar files are in libs/ but not included in the build. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Handling bigger forms, displaying error messages
Hello, android has such a nice style guide, but i can't find a section in it what's talking about displaying error messages. Meant is a when you had a big form on the screen which the user might fill with contents to later click on a save button. How to handle the display of error messages for each field properly? Thanks for all hints and suggestions Daniel -- 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] question about fragment's
Hello, i built up all contents in a app with fragments, followed the tutorial of the example with the article click listener to replace the fragment through another one. To explain i try to implement a wizard with multiple steps to finish it. By invoking transaction.replace(R.id.wizard_content, new FishCreate()); the fragment return value from onCreateView will be attached to the existing views. What i have to do that the inflated content from the previous fragment is really overwritten? Thanks Daniel -- 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 separate 2 WebView's?
Hello, i have 2 Activities where each contains a WebView. In the first activity i do a loadUrl() to login the user in the view. The website is using cookies. When i leave the activity and come later back to it, the cookie is still in the CookieManager and valid, so everything is working fine. But, when i can the second activity which is also opening same url with different query parameters, the server detects the cookie and delete it, also it invalidates the login session. The result is going back to the first activity i had to re-login because of the deleted cookie. My idea was now, to temporäry save the cookie by request the url and restore it later. But that don't work. The same activity exists for another unfortunately popular plattform and there is a new webview spawned with the url which is destroying the cookie if sent in a separate process. So this is working well. But not in android. I am now out of ideas what i can do and i am happy if someone has suggestions/hints for me. Thank you in advance for your help Daniel -- 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: MapView works on some devices and others it doesnt
And a reason could be when the google api's not on the device are present. -- 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] Question about animation
Hello, i would animate a VideoView what scales up and switch then to fullscreen. My code looks like: final VideoView videoView = (VideoView) findViewById(R.id.video_view); final ObjectAnimator x = ObjectAnimator.ofFloat(this, x, 0); x.setTarget(videoView); final ObjectAnimator y = ObjectAnimator.ofFloat(this, y, 0); y.setTarget(videoView); final ObjectAnimator scaleX = ObjectAnimator.ofFloat(this, scaleX, 2); scaleX.setTarget(videoView); final ObjectAnimator scaleY = ObjectAnimator.ofFloat(this, scaleY, 2); scaleY.setTarget(videoView); final AnimatorSet set = new AnimatorSet(); set.setInterpolator(new LinearInterpolator()); set.setDuration(1000); set.playTogether(x, y, scaleX, scaleY); Unfortunately nothing happens. I am happy to read suggestions. Thanks in advance Daniel -- 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
Re: [android-developers] Question about animation
Thanks for your quick answer, i have API Level 11 available for the application, so the compatibility package may help here? Another idea is to render one frame of the video in a hidden fullscreen element, then shrink it down and animate it. I think poeple can neglect that the video is not playing in the zoom animation. Thanks for all input. Daniel -- 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 use a OnClickListener in Fragment
No ability for using the ClickListener in a Fragment? -- 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 use a OnClickListener in Fragment
Hello readers, in a fragment i inflate a xml layout which includes buttons. How can i make use of the OnClickListener to receive the click event nside the fragment? Thanks for reading Daniel -- 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] XStream and proguard qestion
Hello droids, i am using XStream for multiple tasks in a project. But when i release it then it comes that proguard do usual optimizations and obfuscation. Since i am using XStream and let them parse XML into POJO's to work with ease with the XML i run into the problem that XStream won't work properly with proguard. XStream uses introspection/Reflection to fill the POJO's (Models) with the XML content. I'm experimenting around with the proguard options to no let xstream work like: -keepattributes SourceFile,LineNumberTable,EnclosingMethod -keep public class com.yoc.swiss.swiss.ui.news.Rss { *; } -keep public class com.yoc.swiss.swiss.ui.news.Channel { *; } -keep public class com.yoc.swiss.swiss.ui.news.Item { *; } This configuration should avoid modifications in that classes the mapping.txt which progurard outputs confirms that: com.ccc.switch.switch.ui.news.Rss - com.ccc.switch.switch.ui.news.Rss: com.yoc.swiss.swiss.ui.news.Channel channel - channel 7:7:com.yoc.swiss.swiss.ui.news.Channel getChannel() - getChannel just shown one example, the other classes have same output. I am very thankful if someone has suggestions how to solve that. To get XStream working with proguard. Thanks in advance Daniel -- 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] Calendar Widget
Hello everyone, i am looking for a calendar view, like used in android 3.x with ability to translate it. Thanks for all suggestions Daniel -- 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] Layout, Canvas questions
Hello, I have tried asking elsewhere but got no replies so I am now trying here. 1. I want to write an appliction with a LinearLayout containing a Canvas and a Button. When the button is pressed a circle is drawn centered on the canvas, and when the button is pressed again it disappears. 2. Is it better to code this or use an XML file. How would the code look like in each case. 3. Would it be better to draw the button on the canvas. What are the best practices in this case. In the end I will need about six buttons in my app for doing different things. For now I have the following code but I cannot see the button, - package com.example; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; public class ToggleCircle extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout layout = new LinearLayout(this); Panel panel = new Panel(this); Button button = new Button(this); layout.addView(panel); layout.addView(button); setContentView(panel); } private class Panel extends View { private Paint paint; public Panel(Context context) { super(context); paint = new Paint(); } @Override public void onDraw(Canvas canvas) { drawBlack = !drawBlack; canvas.drawColor(drawBlack ? Color.BLACK : Color.WHITE); //canvas.drawCircle(getHeight()/2, getWidth()/2, 10, paint); canvas.drawCircle(20, 20, 10, paint); } private boolean drawBlack = false; } } The button does not seem to be displayed. Besides this code being wrong, I have another problem. Yesterday the emulator was working, today it hangs after displaying the date and time and the battery being charging 50% (not sure how a battery makes sense for an emulator but anyway it hangs): [2011-08-22 14:31:52 - ToggleCircle] -- [2011-08-22 14:31:52 - ToggleCircle] Android Launch! [2011-08-22 14:31:52 - ToggleCircle] adb is running normally. [2011-08-22 14:31:52 - ToggleCircle] Performing com.example.ToggleCircle activity launch [2011-08-22 14:31:52 - ToggleCircle] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'my_avd' [2011-08-22 14:31:52 - ToggleCircle] Uploading ToggleCircle.apk onto device 'emulator-5554' [2011-08-22 14:31:53 - ToggleCircle] Installing ToggleCircle.apk... [2011-08-22 14:31:57 - ToggleCircle] Success! [2011-08-22 14:31:57 - ToggleCircle] Starting activity com.example.ToggleCircle on device emulator-5554 [2011-08-22 14:32:01 - ToggleCircle] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example/.ToggleCircle } -- 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] Designing Wallpapers, Screensaver
Hello, is there a guide available about to create Wallpapers and Screensavers (gif animated)? Thanks Daniel -- 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] Translation handling
Hi droids, i am looking for a possibility to access to the translation via the translation key like my_cart. The reason is that the datasource is more complex and written in xml which is residing in res/raw. So in this xml is just configured which translation key should be used. How can i achieve that? Thanks in advance Daniel -- 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
Re: [android-developers] Translation handling
2011/8/17 Nick Risaro nris...@gmail.com On Wed, Aug 17, 2011 at 3:26 PM, Daniel Rindt daniel.ri...@googlemail.com wrote: Hi droids, i am looking for a possibility to access to the translation via the translation key like my_cart. The reason is that the datasource is more complex and written in xml which is residing in res/raw. So in this xml is just configured which translation key should be used. How can i achieve that? What? Hi Nick, the regular way is like getString(R.string.my_cart); but i wan't to have it like: getString(my_cart); because i just have the key. Thanks -- 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] requestLocationUpdates ignore minTime parameter?
Hello droids, i use requestLocationUpdates with values like 1000, 15000 and so on. But i experience that onLocationChanged is called in a smaller timeframe than the given from 15000msecs. The documentation says: minTime - the minimum time interval for notifications, in milliseconds. This field is only used as a hint to conserve power, and actual time between location updates may be greater or lesser than this value. So what i am do wrong that it is not working as expected? Thanks for all suggestions Daniel -- 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
Aw: Re: [android-developers] requestLocationUpdates ignore minTime parameter?
Ah ok, yes now i got it. Good when english is your native language. :-) Thanks! -- 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] MapView
Hello, i would build a layout where i can have on top a google map on the bottom should appear a table layout with some content and a button. How to implement such a layout, i tried it a couple of hours now, and my summary is that the map is all the time over the entire screen. I can set the height of the map for example 120dp that works, but i want that the map is stretching like match_parent. With the height definition of the table on bottom i could life. Thanks for all suggestions. Daniel -- 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: MapView
On 3 Apr., 19:01, Mark Murphy mmur...@commonsware.com wrote: Use a LinearLayout as the container for the map and the TableLayout. Give the map a height of 0 and a weight of 1. Give the table whatever height makes sense and no weight. This is unfortunately not really working. Here is my code: http://fpaste.org/oqJv/ Thanks for taking a look and giving suggestions to solve the issue. Daniel -- 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: google maps that place where I am now.
On 3 Apr., 19:58, Andrei entre...@gmail.com wrote: Hello. How do you open downloaded google maps that place where I am now. Place to be determined by GPS. Thank you Not sure to right understand you, but you can obtain those informations with easy from the MyLocationOverlay: http://code.google.com/intl/de-DE/android/add-ons/google-apis/reference/com/google/android/maps/MyLocationOverlay.html -- 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: MapView
On 3 Apr., 20:22, Mark Murphy mmur...@commonsware.com wrote: You declined to explain what not really working is, forcing us to guess. I followed your suggestions, but the table and the button is not visible. That i forgot to mention in my previous post. The map uses the entire screen again. My last summary was to show the table and the button, but in the background is the map present, and so not really usable, because the zoom controls are overlap with my button and text. So the best is to split the screen in 2 pieces, where the biggest part should used by the map. The rest are the table and the small button. Here is my currrent layout. Thanks again for your help. http://fpaste.org/kQ9m/ Daniel -- 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] Problems by testing on different devices
Hello, testing my application on different devices with different screens. The QVGA-small-ldpi device brings startup errors. === 8 === E/AndroidRuntime( 874): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.viselabs.myroutes/com.viselabs.myroutes.activity.TabView}: android.content.res.Resources$NotFoundException: File res/drawable/tab_waypoints.xml from drawable resource ID #0x7f020012 === 8 === The mentiones ressource 0x7f020012 is present in the appropriate size in ldpi, mdpi and ldpi. Another side effect is that the application icon is not shown, so a default is shown now. Seems to me that the drawables are searched in a wrong folder? But to repeat ldpi is present and the png's are not corrupt or something. Thanks for your help. Daniel -- 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] Dialog, TabView
Hello, in my Tabhost is an activity shown which has a button. The button has assigned an OnClickListener. The listener calls showDialog(DIALOG_ASK_NAME) which is implemented in onCreateDialog(). But when the layout changes the Dialog disappears and never comes back until i press again the key. I run the activity outside the tab means standalone there its working. So how i can achieve the ordinary behavior? Thanks in advance for your help. Daniel -- 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
Re: [android-developers] Dialog, TabView
Am Montag, den 21.03.2011, 13:37 -0600 schrieb Justin Anderson: Change your TabHost to display views instead of activities... TabHost doesn't handle activities very well. From what I understand it is only partially implemented and dates back to the Android 1.1 days. Hello Justin, thanks for your answer. I don't understand how to implement this. Maybe you can clue me a bit. My TabHost looks like this: === 8 === ?xml version=1.0 encoding=utf-8? TabHost xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent LinearLayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:padding=5dp TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=wrap_content / FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent android:padding=5dp / /LinearLayout /TabHost === 8 === Thanks for helping me. Daniel -- 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] Dialog doesn't show in a ListActivity
Dear reader, my code is pasted here http://rifers.org/paste/show/1254. The problem is that the dialog showContextDialog() is not displayed. The dialog code is directly used from android examples. I played a lot around put that code directly in onResume and so on - no efforts. I'm thankful for all hints to solve that problem. Thanks for reading Daniel -- 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] AVD with Google-API crash
Hello, created an avd with google-api's API Level 9. My application uses GPS when i simulate via GPX File the AndroidRuntime crashes. Here is the stack: === 8 === D/dalvikvm( 1188): GC_EXTERNAL_ALLOC freed 104K, 51% free 2678K/5447K, external 2094K/2137K, paused 68ms D/GPSRecorder( 1188): Track MyTrack001 created, Id: 2 I/DEBUG ( 31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 31): Build fingerprint: 'generic/google_sdk/generic:2.3/GRH55/79397:eng/test-keys' I/DEBUG ( 31): pid: 899, tid: 992 system_server I/DEBUG ( 31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr I/DEBUG ( 31): r0 r1 40549dd8 r2 41adfcbc r3 46b9bd64 I/DEBUG ( 31): r4 012e r5 r6 40549dd8 r7 41adfcbc I/DEBUG ( 31): r8 84301321 r9 84302240 10 0010 fp 0001 I/DEBUG ( 31): ip 82f0e7d4 sp 46b9bd50 lr 82f0ab37 pc 82f07d0e cpsr 0030 I/DEBUG ( 31): #00 pc 7d0e /system/lib/libandroid_servers.so I/DEBUG ( 31): #01 pc ab32 /system/lib/libandroid_servers.so I/DEBUG ( 31): #02 pc 1414 /system/lib/hw/gps.goldfish.so I/DEBUG ( 31): #03 pc 00011a7c /system/lib/libc.so I/DEBUG ( 31): #04 pc 00011640 /system/lib/libc.so I/DEBUG ( 31): I/DEBUG ( 31): code around pc: I/DEBUG ( 31): 82f07cec ab04b082 9301cb04 6f646804 b00247a0 I/DEBUG ( 31): 82f07cfc bc08bc10 4718b002 b510b40c ab04b082 I/DEBUG ( 31): 82f07d0c 6804cb04 34f89301 47a06824 bc10b002 I/DEBUG ( 31): 82f07d1c b002bc08 46c04718 b510b40c ab04b082 I/DEBUG ( 31): 82f07d2c 9301cb04 34986804 47a06824 bc10b002 I/DEBUG ( 31): I/DEBUG ( 31): code around lr: I/DEBUG ( 31): 82f0ab14 91099008 f7fb6aa0 900aeb14 1c3a910b I/DEBUG ( 31): 82f0ab24 6b646b23 930c1c28 1c31940d f7fd9b0f I/DEBUG ( 31): 82f0ab34 4906f8e7 44791c28 f7ff3150 b011fe1d I/DEBUG ( 31): 82f0ab44 46c0bdf0 454c 42c8 0786 I/DEBUG ( 31): 82f0ab54 f7fbb510 bd10ec7c 4802b510 f7fb4478 I/DEBUG ( 31): I/DEBUG ( 31): stack: I/DEBUG ( 31): 46b9bd10 46b9be43 I/DEBUG ( 31): 46b9bd14 46b9be49 I/DEBUG ( 31): 46b9bd18 46b9be4a I/DEBUG ( 31): 46b9bd1c 46b9be53 I/DEBUG ( 31): 46b9bd20 ab90 [heap] I/DEBUG ( 31): 46b9bd24 81d48bd3 /system/lib/libdvm.so I/DEBUG ( 31): 46b9bd28 ab90 [heap] I/DEBUG ( 31): 46b9bd2c 46b9bd5c I/DEBUG ( 31): 46b9bd30 00010004 [heap] I/DEBUG ( 31): 46b9bd34 81d3761b /system/lib/libdvm.so I/DEBUG ( 31): 46b9bd38 46b9be63 I/DEBUG ( 31): 46b9bd3c 46b9be64 I/DEBUG ( 31): 46b9bd40 46b9be65 I/DEBUG ( 31): 46b9bd44 46b9be00 I/DEBUG ( 31): 46b9bd48 df002777 I/DEBUG ( 31): 46b9bd4c e3a070ad I/DEBUG ( 31): #00 46b9bd50 I/DEBUG ( 31): 46b9bd54 8053bf25 /system/lib/libandroid_runtime.so I/DEBUG ( 31): 46b9bd58 012e I/DEBUG ( 31): 46b9bd5c 82f0ab37 /system/lib/libandroid_servers.so I/DEBUG ( 31): 46b9bd60 41adfcbc /dev/ashmem/dalvik-LinearAlloc (deleted) I/DEBUG ( 31): 46b9bd64 0003 I/DEBUG ( 31): #01 46b9bd68 f6a93f29 I/DEBUG ( 31): 46b9bd6c c043f2e9 I/DEBUG ( 31): 46b9bd70 b9858095 I/DEBUG ( 31): 46b9bd74 4066004a /dev/ashmem/dalvik-heap (deleted) I/DEBUG ( 31): 46b9bd78 I/DEBUG ( 31): 46b9bd7c I/DEBUG ( 31): 46b9bd80 I/DEBUG ( 31): 46b9bd84 I/DEBUG ( 31): 46b9bd88 I/DEBUG ( 31): 46b9bd8c I/DEBUG ( 31): 46b9bd90 I/DEBUG ( 31): 46b9bd94 I/DEBUG ( 31): 46b9bd98 b13c4340 I/DEBUG ( 31): 46b9bd9c 012e I/DEBUG ( 31): 46b9bda0 46b9be56 I/DEBUG ( 31): 46b9bda4 0003 I/DEBUG ( 31): 46b9bda8 afd4d5c8 I/DEBUG ( 31): 46b9bdac 46b9bde8 I/DEBUG ( 31): 46b9bdb0 46b9be90 I/DEBUG ( 31): 46b9bdb4 84302240 /system/lib/hw/gps.goldfish.so I/DEBUG ( 31): 46b9bdb8 I/DEBUG ( 31): 46b9bdbc 84301417 /system/lib/hw/gps.goldfish.so I/ActivityManager( 899): Process android.process.media (pid 1055) has died. D/AndroidRuntime( 1231): D/AndroidRuntime( 1231): AndroidRuntime START com.android.internal.os.RuntimeInit D/AndroidRuntime( 1231): CheckJNI is ON D/AndroidRuntime( 1231): Calling main entry com.android.commands.pm.Pm I/ActivityManager( 899): Process com.android.email (pid 1108) has died. I/ActivityManager( 899): Low Memory: No more background processes. D/AndroidRuntime( 1231): Shutting down VM D/dalvikvm( 1231): GC_CONCURRENT freed 177K, 71% free 297K/1024K, external 0K/0K, paused 2ms+2ms D/dalvikvm( 1231): Debugger has detached; object registry had 1 entries I/AndroidRuntime( 1231): NOTE: attach of
Re: [android-developers] Dialog doesn't show in a ListActivity
Am Montag, den 14.03.2011, 07:44 -0500 schrieb TreKing: Well, a dialog is not going to be displayed if you don't tell the system to display it, which is done with the show() method. Can you post the examples you got that from? Because that's wrong in so many ways. http://developer.android.com/guide/topics/ui/dialogs.html#AlertDialog Its the Paragraph Adding a list. 1 - Never use getApplicationContext() - it's utterly pointless and just does not work with dialogs. How then obtain the Context to display it? 2 - Call show() on the Dialog you create to actually show it. In the docs i found: AlertDialog.Builder.create(); also shows the Dialog. Thanks Daniel -- 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
Re: [android-developers] Dialog doesn't show in a ListActivity
Am Montag, den 14.03.2011, 08:53 -0500 schrieb TreKing: Creates a AlertDialog with the arguments supplied to this builder. It does not show() the dialog. This allows the user to do any extra processing before displaying the dialog. Use show() if you don't have any other processing to do and want this to be created and displayed. Yes thanks for open up my eyes. :) Daniel -- 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] TabView, ListActivity Problem
Hi, in my TabView you can show it here: http://fpaste.org/sEnm/ i would like to display a ListActivity with a usual ListView. That works so far but, the ListView is not stretching over the entire rest of the screen as they usually do because the parent element defines a fill_parent you can see in the xml code from the layout above. Thanks for all hints Daniel -- 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: Local Services
On 10 Mrz., 02:52, Mark Murphy mmur...@commonsware.com wrote: Hello Mark, First, you do not typically use both startService() and bindService(), but rather one or the other. I'm confused about that. So please let me explain a bit more about what i want to do. Try to implement a service what is getting gps information and record that to a database. An activity get information from that record service to display it. But the user can deceide if he close the activity or not. To say it simply the UI should attach and detach from the service. The question what is raising is that possible with a service implementation and bindService? I haven't find answers to this question in your books yet. ;-) The books are great stuff, maybe my bad english comprehension is the problem here. Thanks Daniel -- 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] Local Services
Hello, i have a Problem with bind to a running service. In my activity starts the service with startService() and after that i would bind to that service to communicate with them. I inserted a Log.d to inspect the behavior of the service and the service connection. My summary is that the order is not as expected, the service is starting after the execution of onResume in my activity. So the bind process executed before that and fails then. Hopefully someone can clue me a bit. Thanks for reading. Daniel -- 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