As you can see, the vertical positioning of id/frequency is to be
directly below id/name. At various times the app sets different
strings as the text of these TextViews. Sometimes the top TextView is
supposed to be blank. I do that by setting:
nameTV.setText(nameString); //..where nameString happens to be
"" (zero length)
And I expect that after such a setting, the RelativeLayout will
continue to hold a 18sp vertical space for the blanked TextView, so
that the second TextView appears in its proper place regardless. And
indeed this is exactly what happens on the emulator and on a Motorola
Droid and on two different Chinese-brand tablets. The app is compiled
use API 8 for Android 2.2. But on a Acer A100 tablet running Android
3.2, this is not what happens. Instead a TextView with a zero-length
text takes up no room at all and the second TextView slides up to
where the first TextView would have been. I know I could probably fix
the problem by setText(" ") instead of setText(""), but there are
various reasons in my app that would make that a messy solution. Can
anyone confirm or explain this layout behavior?
not to argue ~ I feel we need to establish a Compatibility Definition
for the issue - just recently I had jet another GUI designer try to
tell me nulls were handled by the code when we were looking at code
that had no null handler = in other works (my opinion) is default
behavior for supplied GUI should
1] trap nulls on a String and put a "" in place silently
2] display a supplied "" in the intuitive manner of null
3] allow " " to be specified as a workaround that == ""
this is a pestilence from days begone and needs to go there
On Nov 4, 10:32 am, RLScott <fixthatpi...@yahoo.com> wrote:
> As you can see, the vertical positioning of id/frequency is to be
> directly below id/name. At various times the app sets different
> strings as the text of these TextViews. Sometimes the top TextView is
> supposed to be blank. I do that by setting:
> nameTV.setText(nameString); //..where nameString happens to be
> "" (zero length)
> And I expect that after such a setting, the RelativeLayout will
> continue to hold a 18sp vertical space for the blanked TextView, so
> that the second TextView appears in its proper place regardless. And
> indeed this is exactly what happens on the emulator and on a Motorola
> Droid and on two different Chinese-brand tablets. The app is compiled
> use API 8 for Android 2.2. But on a Acer A100 tablet running Android
> 3.2, this is not what happens. Instead a TextView with a zero-length
> text takes up no room at all and the second TextView slides up to
> where the first TextView would have been. I know I could probably fix
> the problem by setText(" ") instead of setText(""), but there are
> various reasons in my app that would make that a messy solution. Can
> anyone confirm or explain this layout behavior?
On Nov 4, 4:26 pm, Belvedere Computer Services <fa829...@gmail.com>
wrote:
> not to argue ~ I feel we need to establish a Compatibility Definition
> for the issue - just recently I had jet another GUI designer try to
> tell me nulls were handled by the code when we were looking at code
> that had no null handler = in other works (my opinion) is default
> behavior for supplied GUI should
> 1] trap nulls on a String and put a "" in place silently
> 2] display a supplied "" in the intuitive manner of null
> 3] allow " " to be specified as a workaround that == ""
> this is a pestilence from days begone and needs to go there
That is a different problem. I was never using nulls. All my strings
were real strings that sometimes had zero length (no characters).
There is a big difference between a String variable that is null and a
String variable that refers to a string with zero characters in it.
I remember noting this as a difference in Honeycomb compared to old
Android versions. You might want to try in a Honeycomb (and even ICS)
emulator as a reference. And I would love for a Google Android
engineer to chime in as to why the behavior or TextView changed --
this is not an insignificant change.
Doug
On Nov 4, 8:32 am, RLScott <fixthatpi...@yahoo.com> wrote:
> The app is compiled
> use API 8 for Android 2.2. But on a Acer A100 tablet running Android
> 3.2, this is not what happens. Instead a TextView with a zero-length
> text takes up no room at all and the second TextView slides up to
> where the first TextView would have been. I know I could probably fix
> the problem by setText(" ") instead of setText(""), but there are
> various reasons in my app that would make that a messy solution. Can
> anyone confirm or explain this layout behavior?
On Sun, Nov 6, 2011 at 7:45 AM, Doug <beafd...@gmail.com> wrote: > I remember noting this as a difference in Honeycomb compared to old > Android versions. You might want to try in a Honeycomb (and even ICS) > emulator as a reference. And I would love for a Google Android > engineer to chime in as to why the behavior or TextView changed -- > this is not an insignificant change.
> Doug
> On Nov 4, 8:32 am, RLScott <fixthatpi...@yahoo.com> wrote: > > The app is compiled > > use API 8 for Android 2.2. But on a Acer A100 tablet running Android > > 3.2, this is not what happens. Instead a TextView with a zero-length > > text takes up no room at all and the second TextView slides up to > > where the first TextView would have been. I know I could probably fix > > the problem by setText(" ") instead of setText(""), but there are > > various reasons in my app that would make that a messy solution. Can > > anyone confirm or explain this layout behavior?
> -- > 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+unsubscribe@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en