[android-developers] Re: RelativeLayout passes EXACTLY measure spec mode where it should pass AT_MOST

2013-12-14 Thread Y2i
More information: In the attached project, add the following attributes to MyImageView/ : android:adjustViewBounds=true android:scaleType=centerCrop If MyImageView/ is inside FrameLayout/ the (expected) result will be:

[android-developers] Re: RelativeLayout passes EXACTLY measure spec mode where it should pass AT_MOST

2013-12-13 Thread Y2i
Created an issue for this problem: https://code.google.com/p/android/issues/detail?id=63673 -- 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

Re: [android-developers] Cannot peek value from TypedArray

2013-12-09 Thread Y2i
I ended up creating a custom UI element and using obtainStyledAttributeshttp://developer.android.com/reference/android/content/res/Resources.Theme.html#obtainStyledAttributes(android.util.AttributeSet, int[], int, int). It is not exactly what I wanted but it works :) On Monday, December 2,

Re: [android-developers] Cannot peek value from TypedArray

2013-12-02 Thread Y2i
Exactly the same story :( On Monday, December 2, 2013 9:44:15 AM UTC-8, MagouyaWare wrote: What happens if you use this version of obtainStyledAttributes()? *final TypedArray a = theme.obtainStyledAttributes(R.style.MyText, attrs); * Thanks, Justin Anderson MagouyaWare Developer

[android-developers] Re: Introspecting Android style in code

2013-11-25 Thread Y2i
Context.obtainStyledAttributes() implemented as public final TypedArray obtainStyledAttributes(int resid, int[] attrs) throws Resources.NotFoundException { return getTheme().obtainStyledAttributes(resid, attrs); } and Theme.obtainStyledAttributes() has a different problem that I asked about

[android-developers] Introspecting Android style in code

2013-11-23 Thread Y2i
I have a style style name=MyText item name=android:textColor#8080/item item name=android:background#ffc0c0c0/item/style that I would like to introspect in code. I run this code: final Resources r = getResources();final TypedArray a = r.obtainTypedArray(R.style.MyText);try {

[android-developers] Cannot peek value from TypedArray

2013-11-23 Thread Y2i
I have a style style name=MyText item name=android:background#ffc0c0c0/item item name=android:textColor#8080/item /style which I am trying to introspect in my ocde. I use this code to retrieve typed array: final Resources.Theme theme = getActivity().getTheme(); final int[] attrs

Re: [android-developers] Children of LinearLayout can't have @+id/something

2013-05-13 Thread Y2i
Piren, thanks for the advice. I do use the right scope to lookup children and have no problems looking them up. It is the framework that have problems :( I also understand that the samples are just samples and half-baked. When you try to complete the layout animation sample, it works if id

Re: [android-developers] Children of LinearLayout can't have @+id/something

2013-05-12 Thread Y2i
If we inflate from the same layout, all child elements within that layout will have the same ids by definition. If framework does not allow adding children inflated from the same file to a LinearLayout I would consider it as a not very good framework :(Even if the framework does its own

Re: [android-developers] Children of LinearLayout can't have @+id/something

2013-05-12 Thread Y2i
One correction: when I said If we modify the sample I meant If we modify the sample so that it preserves the state on orientation change. -- -- 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] Children of LinearLayout can't have @+id/something

2013-05-09 Thread Y2i
I ran into this issue earlier today: https://code.google.com/p/android/issues/detail?id=55106 The problem is: - LinearLayout has children - every child is inflated from the same XML layout file - a child has nested element with some ID. - The ID is used to call findViewById(ID) to

Re: [android-developers] Children of LinearLayout can't have @+id/something

2013-05-09 Thread Y2i
The situation with LinearLayout is pretty flaky. I finally made the project work - see the second attached project at https://code.google.com/p/android/issues/detail?id=55106 If you go to item_main.xml and change android:textIsSelectable from *false* to *true*, the bug shows up. Keep

Re: [android-developers] Children of LinearLayout can't have @+id/something

2013-05-09 Thread Y2i
The situation with LinearLayout is pretty flaky. I finally made the project work - see the second attached project at https://code.google.com/p/android/issues/detail?id=55106 If you go to item_main.xml and change android:textIsSelectable from *false* to *true*, the bug shows up. Keep

Re: [android-developers] Children of LinearLayout can't have @+id/something

2013-05-09 Thread Y2i
Set android:textIsSelectable=false for all TextViews in the larger project where I first noticed the problem - now all issues are resolved. But I'm afraid the overall situation is unstable and I will run into more problems in the future with this approach :( Will probably be switching to

Re: [android-developers] Defining custom drawables in XML

2012-07-07 Thread Y2i
Hi Romain, Has this been changed or are the docs incorrect? http://developer.android.com/guide/topics/graphics/2d-graphics.html#drawables-from-xml Any Drawable subclass that supports the inflate() method can be defined in XML and instantiated by your application. Thank you! -- You received

Re: [android-developers] Re: Referring other library projects from within a library project.

2012-03-27 Thread Y2i
It was working for me before R17 tools were available and works with R17 tools too. -- 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,

[android-developers] Re: Referring other library projects from within a library project.

2012-03-26 Thread Y2i
Would this work? http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject On Monday, March 26, 2012 10:15:25 PM UTC-7, MB wrote: Hi, I want to refer to a library project from within another library project. Is there some way to accomplish

[android-developers] Re: getHits() succeeds but waitForActivityWithTimeout() returns null

2012-03-26 Thread Y2i
No Google engineers who could help? :) On Saturday, March 24, 2012 8:25:02 AM UTC-7, Y2i wrote: Could someone please help me understand why in the code below assertEquals(1, monSettings.getHits()) succeeds but assertNotNull(activitySettings) fails? WifiSettingsActivity starts fine, I can

[android-developers] getHits() succeeds but waitForActivityWithTimeout() returns null

2012-03-24 Thread Y2i
Could someone please help me understand why in the code below assertEquals(1, monSettings.getHits()) succeeds but assertNotNull(activitySettings) fails? WifiSettingsActivity starts fine, I can see it, but activitySettings is null. Is it because I'm starting an activity that is defined outside

[android-developers] Re: NullPointerException on setOnClickListener

2012-03-24 Thread Y2i
Could you please verify that btnFeed is not 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] Re: getHits() succeeds but waitForActivityWithTimeout() returns null

2012-03-24 Thread Y2i
, Y2i wrote: Could someone please help me understand why in the code below assertEquals(1, monSettings.getHits()) succeeds but assertNotNull(​activitySettings) fails? WifiSettingsActivity starts fine, I can see it, but activitySettings is null. Is it because I'm starting an activity

[android-developers] Re: getHits() succeeds but waitForActivityWithTimeout() returns null

2012-03-24 Thread Y2i
, Y2i wrote: Could someone please help me understand why in the code below assertEquals(1, monSettings.getHits()) succeeds but assertNotNull(​activitySettings) fails? WifiSettingsActivity starts fine, I can see it, but activitySettings is null. Is it because I'm starting an activity

[android-developers] Re: One process, two live Application objects?

2011-12-20 Thread Y2i
No, Diane is saying that you can say Singleton.getInstance(context.getApplication()) to pass the Application reference to the singleton and it will be used to initialize the singleton if not already. No, Diane was clearly saying Singleton.getInstance(context) to pass context (not the

[android-developers] Re: Want to know about Thread life cycle

2011-12-20 Thread Y2i
The thread will still run. (And if it holds a reference back to the activity that started it, the activity will not be garbage collected after the activity is destroyed.) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

Re: [android-developers] Re: One process, two live Application objects?

2011-12-19 Thread Y2i
Hm, so when do you need to just have code start running in your process first thing? Generally it needs to run for something else -- and that something else needs to make a call somewhere to get what it wants. Having that call Singleton.getInstance(context) (at which point you can do

[android-developers] Preview Events

2011-12-11 Thread Y2i
Hello everyone, Is there a place in Android to add a preview event handler, similar to GWT's

Re: [android-developers] Preview Events

2011-12-11 Thread Y2i
Thanks for your response Mark! Your answer saddened me :( -- 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] Re: Instrumentation: can this mechanism be used for something else than testing ?

2011-12-10 Thread Y2i
Hi Pablo, have you been able to intercept events using instrumentation? -- 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