[android-developers] setClipChildren(false) and MotionEvent

2013-03-15 Thread marcin kolonko
is it possible for views to recieve touchevents when they are made visible 
through setClipChildren(false)?

-- 
-- 
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: updating layout params after animation finished

2012-08-06 Thread marcin kolonko
no.
i had to animate both views separately.



On 6 August 2012 11:10, Joshua Li li.joshua...@gmail.com wrote:

 On Thursday, 19 July 2012 00:42:27 UTC-7, marcin kolonko  wrote:
  i have 2 views in a RelativeLayout like this:?xml version=1.0
 encoding=utf-8?
  RelativeLayout
  xmlns:android=http://schemas.android.com/apk/res/android;
  android:layout_width=match_parent
  android:layout_height=match_parent 
 
  View
  android:id=@+id/view1
  android:layout_width=match_parent
  android:layout_height=200dp
  android:background=@drawable/shape_red/
 
  View
  android:id=@+id/view2
  android:layout_width=match_parent
  android:layout_height=50dp
  android:layout_below=@id/view1
  android:background=@drawable/shape_blue/
 
  /RelativeLayout
 
  now, i animate the y property of view1 from 0 to 300. but i
 want view2 to change its position according to view1 - because view2 is set
 to be below (layout-below) view1.
  as this isn't working, i tried to add an onAnimationEnd listener to the
 animation. like this:ObjectAnimator ani = ObjectAnimator.ofFloat(view1,
 Y, 200);
  ani.setDuration(2000);
  ani.addListener(new AnimatorListenerAdapter()
  {
  @Override
  public void onAnimationEnd(Animator animation)
  {
  LayoutParams params = new
 LayoutParams(LayoutParams.MATCH_PARENT, view2.getHeight());
  params.addRule(RelativeLayout.BELOW, view1.getId());
 
  view2.setLayoutParams(params);
  }
  });
 
  but view2 didn't change its position at all.
  i would like to avoid making a new animation for view2 if possible, so
 please don't bother to suggest one. ;)
  does anyone have some suggestions?

 I'm facing the same issue. Were you ever able to find a solution to this?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: updating layout params after animation finished

2012-08-06 Thread marcin kolonko
actually i had an idea to apply layout_below on update (when view1 is
animated), but didn't try it out in the end.

On 6 August 2012 13:05, marcin kolonko makolo...@gmail.com wrote:

 no.
 i had to animate both views separately.



 On 6 August 2012 11:10, Joshua Li li.joshua...@gmail.com wrote:

 On Thursday, 19 July 2012 00:42:27 UTC-7, marcin kolonko  wrote:
  i have 2 views in a RelativeLayout like this:?xml version=1.0
 encoding=utf-8?
  RelativeLayout
  xmlns:android=http://schemas.android.com/apk/res/android;
  android:layout_width=match_parent
  android:layout_height=match_parent 
 
  View
  android:id=@+id/view1
  android:layout_width=match_parent
  android:layout_height=200dp
  android:background=@drawable/shape_red/
 
  View
  android:id=@+id/view2
  android:layout_width=match_parent
  android:layout_height=50dp
  android:layout_below=@id/view1
  android:background=@drawable/shape_blue/
 
  /RelativeLayout
 
  now, i animate the y property of view1 from 0 to 300. but i
 want view2 to change its position according to view1 - because view2 is set
 to be below (layout-below) view1.
  as this isn't working, i tried to add an onAnimationEnd listener to the
 animation. like this:ObjectAnimator ani = ObjectAnimator.ofFloat(view1,
 Y, 200);
  ani.setDuration(2000);
  ani.addListener(new AnimatorListenerAdapter()
  {
  @Override
  public void onAnimationEnd(Animator animation)
  {
  LayoutParams params = new
 LayoutParams(LayoutParams.MATCH_PARENT, view2.getHeight());
  params.addRule(RelativeLayout.BELOW, view1.getId());
 
  view2.setLayoutParams(params);
  }
  });
 
  but view2 didn't change its position at all.
  i would like to avoid making a new animation for view2 if possible, so
 please don't bother to suggest one. ;)
  does anyone have some suggestions?

 I'm facing the same issue. Were you ever able to find a solution to this?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] updating layout params after animation finished

2012-07-19 Thread marcin kolonko


i have 2 views in a RelativeLayout like this:

?xml version=1.0 encoding=utf-8?
RelativeLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=match_parent
android:layout_height=match_parent 

View
android:id=@+id/view1
android:layout_width=match_parent
android:layout_height=200dp
android:background=@drawable/shape_red/

View
android:id=@+id/view2
android:layout_width=match_parent
android:layout_height=50dp
android:layout_below=@id/view1
android:background=@drawable/shape_blue/

/RelativeLayout

now, i animate the y property of view1 from 0 to 300. but i want view2 to 
change its position according to view1 - because view2 is set to be below 
(layout-below) view1.

as this isn't working, i tried to add an onAnimationEnd listener to the 
animation. like this:

ObjectAnimator ani = ObjectAnimator.ofFloat(view1, Y, 200);
ani.setDuration(2000);
ani.addListener(new AnimatorListenerAdapter()
{
@Override
public void onAnimationEnd(Animator animation)
{
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, 
view2.getHeight());
params.addRule(RelativeLayout.BELOW, view1.getId());

view2.setLayoutParams(params);
}
});

but view2 didn't change its position at all.

i would like to avoid making a new animation for view2 if possible, so 
please don't bother to suggest one. ;)

does anyone have some suggestions?

-- 
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 change background of an overflow menuitem

2012-07-05 Thread marcin kolonko
ok, i found a solution for my problem: link to a post in the 
ActionBarSherlock google group ok, i found a solution for my problem: 
[link to a post in the ActionBarSherlock google group][1] i've overseen 
this entry: `android:actionBarWidgetTheme` in the 
`Theme.Holo.Light.DarkActionBar` theme. now all i had to do is define a 
theme that overrides `Theme.Holo` with one style in it: `item 
name=android:dropDownListViewStyle@style/myDropDownListView/item` and 
point to this theme instead. !-- theme referenced by actionBarWidgetTehme 
style -- style name=Theme.DropDown.Dark 
parent=android:style/Theme.Holo item 
name=android:dropDownListViewStyle@style/myDropDownListView/item 
/style !-- my main theme -- style name=DarkActionBarRedActionMode 
parent=android:style/Theme.Holo.Light.DarkActionBar item 
name=android:actionBarWidgetTheme@style/Theme.DropDown.Dark/item 
/style [1]: 
https://groups.google.com/forum/?fromgroups#!msg/actionbarsherlock/AxB6shftiK0/HbvsrBgMpsoJ


i've overseen this entry: android:actionBarWidgetTheme in the 
Theme.Holo.Light.DarkActionBar theme.

now all i had to do is define a theme that overrides Theme.Holo with one 
style in it: item 
name=android:dropDownListViewStyle@style/myDropDownListView/item and 
point to this theme instead.

!-- theme referenced by actionBarWidgetTehme style --
style name=Theme.DropDown.Dark parent=android:style/Theme.Holo
item 
name=android:dropDownListViewStyle@style/myDropDownListView/item
/style

!-- my main theme --
style name=DarkActionBarRedActionMode 
parent=android:style/Theme.Holo.Light.DarkActionBar
item 
name=android:actionBarWidgetTheme@style/Theme.DropDown.Dark/item
/style

-- 
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 change background of an overflow menuitem

2012-07-04 Thread marcin kolonko
i have a native actionbar on a 4.0.4 android phone in the actionbar i have 
some menuitems hidden in an overflow menu.

the pressed/focussed state of my actionbar buttons have a custom color, 
that i would like to use as well on the listitems in the overflow menu.

that's what i'm talking about:
i would like to change the blue background to something different.

what style do i have to override? it seems i can't find the appropriate 
style.

i use a modified Theme that overrides *Theme.Holo.Light.DarkActionBar *i 
found every possible style - but none works on the overflow menu list.

thx

-- 
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] MenuCompat and MenuItemCompat

2012-06-28 Thread marcin kolonko
what does the two classes do actually? and how i can use it?

thx

-- 
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] styling the contextual action bar

2012-06-19 Thread marcin kolonko
is there a way to stlye the CAB like you would style the action bar?
i'd like to change the colors...

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] Re: Contextual Action Bar color theme

2012-06-19 Thread marcin kolonko
alex, did you find a way to change the colors of the CAB?


On Wednesday, February 8, 2012 2:56:04 PM UTC+1, Alex O. wrote:

 Hi, 

 The UI core elements for the Holo Light seem to be focused on two 
 colors - green or blue: 
 http://www.flickr.com/photos/takenbyhim/5933010235/ 

 However, the Contextual Action Bar seems to come only in green. Is 
 there any built-in style that makes it blue? Are there any easy ways 
 to theme the Contextual Action Bar? 

 Thank you, 
 Alex 


-- 
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 make a button event bubble up to listview

2012-06-11 Thread marcin kolonko
is there a way to make a touch event on a button bubble up to the listview?

i want to be able to recieve click events on a button.
but when the user start scrolling while touching the button, the 
motionevent should be going up to the row, where the gesture is detected.

thx

-- 
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] best practice in extending classes

2012-06-08 Thread marcin kolonko
when i extend internal classes or core classes like View.OnClickListener or 
ArrayAdapter - do i have to manually take care of all objects inside to 
prevent memory leaks? like in overriding the onStop() or onDestroy() 
methods and setting objects to null?

thx

-- 
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: instance count violation

2012-06-08 Thread marcin kolonko
thanks a lot for the answers. i also came up with the solution to ignore 
this error. :)

On Thursday, June 7, 2012 12:39:58 PM UTC+2, marcin kolonko wrote:

 hi,
 i have an app with two classes:

 *SelectItemActivity** extends **AbstractListActivity,* and *
 AbstractListActivity extends Activity*
 *
 *
 (~20 lines of code each) - not much to screw up i thought...

 links to pastebin:
 *AbstractListActivity* : http://pastebin.com/iKEa3d3a
 *SelectItemActivity : *http://pastebin.com/UC01gvTg
 *Menu*: http://pastebin.com/vjL1r28q

 now, when i click on the button in the actionbar, switch to landscape and 
 then back to portrait, the app crashes and i get this error:
 *android.os.StrictMode$InstanceCountViolation: class 
 ch.futurecom.MeetingMaid.view.SelectItemActivity; instances=2; limit=1*
 *
 *
 does anyone have a clue what's going on?

 thx


-- 
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: best practice in extending classes

2012-06-08 Thread marcin kolonko
as of now, i set all class members to null, but do nothing inside classes i 
extended, like listeners or adapters or anonymous classes.

would that be enough?

-- 
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: best practice in extending classes

2012-06-08 Thread marcin kolonko
as of now, i set all class members to null, but do nothing inside classes i 
extended, like listeners or adapters or anonymous classes.

would that be enough?

-- 
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] onTouch, onFling and an ImageButton in a ListView topped with NullPointerExeption

2012-06-08 Thread marcin kolonko
hi,
in a row of a *ListView *i have a *TextView *and an *ImageButton*
on an *ListView *instance i have a *GestureDetector *and a extended *
SimpleOnGestureListener*, on the ImageView instance i have called 
setFocusable(false).

now, the swipe is registered when the start is not on the *ImageButton*, 
and everything works. but when i start the swipe on the *ImageButton*, i 
get a NullPointerExeption.

the exeption happens in the *onFling()* method of *SimpleOnGestureListener*, 
because ne *MotionEvent *e1 is null.

is there a way  *ImageButton* can continue to be a button, but propagate 
the event up?

here are links to pastebin where you can see the classes:
adapter: http://pastebin.com/djgYebcb
activity with gesturedetector: http://pastebin.com/4x6Tq7Yb
main.xml: http://pastebin.com/WkEje1h7
row.xml: http://pastebin.com/2YTmwGju

thx

-- 
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] soft keyboard not showing

2012-06-07 Thread marcin kolonko
yes, the keyboard shows when i tap inside.
should the default behavior not be, like, show keyboard when receive foucus?

On Friday, May 25, 2012 6:41:38 PM UTC+2, MagouyaWare wrote:

 in my layout xml i have a stubview. the layout that replaces the stubview 
 has a EditText view inside.
 but when i inflate stubview, the soft keyboard doesn't show automagically.

 Does the keyboard show when you tap inside the EditText?  That is the 
 default keyboard behavior...


 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Thu, May 24, 2012 at 7:17 AM, marcin kolonko makolo...@gmail.comwrote:

 hi,

 in my layout xml i have a stubview. the layout that replaces the stubview 
 has a EditText view inside.
 but when i inflate stubview, the soft keyboard doesn't show automagically.

 is this the default behaviour?

 i know i can show the keyboard myself, just want to know if i really have 
 to mess with the default behaviour of the keyboard/edittext.

  thx!

 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] instance count violation

2012-06-07 Thread marcin kolonko
hi,
i have an app with two classes:

*SelectItemActivity** extends **AbstractListActivity,* and *
AbstractListActivity extends Activity*
*
*
(~20 lines of code each) - not much to screw up i thought...

links to pastebin:
*AbstractListActivity* : http://pastebin.com/iKEa3d3a
*SelectItemActivity : *http://pastebin.com/UC01gvTg
*Menu*: http://pastebin.com/vjL1r28q

now, when i click on the button in the actionbar, switch to landscape and 
then back to portrait, the app crashes and i get this error:
*android.os.StrictMode$InstanceCountViolation: class 
ch.futurecom.MeetingMaid.view.SelectItemActivity; instances=2; limit=1*
*
*
does anyone have a clue what's going on?

thx

-- 
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: instance count violation

2012-06-07 Thread marcin kolonko
ok, i did some memory digging with ddms and memory analizer. and there' 
s weird behavior:

when i run the garbage collector while in portrait mode (still the same 
case us in first post) and come back to portrait mode, nothing bad happens. 
the app behaves as it should.
when i don't run the garbage collector, the app crashes with the instance 
count violation error.

-- 
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: instance count violation

2012-06-07 Thread marcin kolonko
ok, i did some memory digging with ddms and memory analizer. and there' 
s weird behavior:

when i run the garbage collector while in portrait mode (still the same 
case us in first post) and come back to portrait mode, nothing bad happens. 
the app behaves as it should.
when i don't run the garbage collector, the app crashes with the instance 
count violation error.

On Thursday, June 7, 2012 12:39:58 PM UTC+2, marcin kolonko wrote:

 hi,
 i have an app with two classes:

 *SelectItemActivity** extends **AbstractListActivity,* and *
 AbstractListActivity extends Activity*
 *
 *
 (~20 lines of code each) - not much to screw up i thought...

 links to pastebin:
 *AbstractListActivity* : http://pastebin.com/iKEa3d3a
 *SelectItemActivity : *http://pastebin.com/UC01gvTg
 *Menu*: http://pastebin.com/vjL1r28q

 now, when i click on the button in the actionbar, switch to landscape and 
 then back to portrait, the app crashes and i get this error:
 *android.os.StrictMode$InstanceCountViolation: class 
 ch.futurecom.MeetingMaid.view.SelectItemActivity; instances=2; limit=1*
 *
 *
 does anyone have a clue what's going on?

 thx


-- 
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] soft keyboard not showing

2012-05-25 Thread marcin kolonko
hi,

in my layout xml i have a stubview. the layout that replaces the stubview 
has a EditText view inside.
but when i inflate stubview, the soft keyboard doesn't show automagically.

is this the default behaviour?

i know i can show the keyboard myself, just want to know if i really have 
to mess with the default behaviour of the keyboard/edittext.

thx!

-- 
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