0
<ImageView 
        android:id="@+id/wipeID"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/popup_window"
        android:layout_alignBottom="@+id/linerID"
        android:src="@drawable/wiper_btn"/>

In the above one android:layout_alignBottom="@+id/linerID" is remove programmatically how to remove that one?

Cœur
  • 37,241
  • 25
  • 195
  • 267
karthik
  • 209
  • 1
  • 6
  • 11
  • not understandable... please will you explain in detail – Android Jun 02 '14 at 10:44
  • Before perform onclick i want these two allignments android:layout_above="@+id/popup_window" android:layout_alignBottom="@+id/linerID" But after perform onclick i need remove the this one android:layout_alignBottom="@+id/linerID" programattically how to do that one plz help me. – karthik Jun 02 '14 at 10:53
  • OK.. do you mean to hide some view? – Android Jun 02 '14 at 10:56
  • yes how to do that one. – karthik Jun 02 '14 at 10:58
  • http://stackoverflow.com/questions/18852423/how-to-show-hide-grouped-views-in-android – Android Jun 02 '14 at 11:01
  • thanku @pragna But i want remove just this one only android:layout_alignBottom="@+id/linerID" don't hide the total view. I don't know is it possible or not. – karthik Jun 02 '14 at 11:06

2 Answers2

1

If I don't get you wrong you want to change your layout parameters...

So this is roughly how you can achive it:

  1. get your imageview with findViewById(...)
  2. get the layout parameters somehow like this: LinearLayout.LayoutParams params = ( LinearLayout.LayoutParams) imageView.getLayoutParams();
  3. change them by setting the values you want: params.setMargins(newX, newY, 0, 0); //for margins imageView.setLayoutParams(params); if this does not work (param for align bottom does not exist) you can add rules: this could help or google something like "android add rule layout param"

hope this leads you to the right track...

Community
  • 1
  • 1
codewing
  • 674
  • 8
  • 25
0

Try using this : imageView.setBaselineAlignBottom(false);

micnubinub
  • 116
  • 1
  • 8