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:
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
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,
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
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
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 {
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
, 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
, 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
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
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
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
Hello everyone,
Is there a place in Android to add a preview event handler, similar to
GWT's
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
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
28 matches
Mail list logo