List of usage examples for android.widget RelativeLayout ALIGN_PARENT_END
int ALIGN_PARENT_END
To view the source code for android.widget RelativeLayout ALIGN_PARENT_END.
Click Source Link
From source file:de.sourcestream.movieDB.controller.MovieDetails.java
/** * Updates the icons position when called. *//*w w w .j a v a 2 s . c om*/ public void updateUpPos() { RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(moreIcon.getWidth(), moreIcon.getHeight()); RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight()); RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(trailerIcon.getWidth(), trailerIcon.getHeight()); RelativeLayout.LayoutParams lp3 = new RelativeLayout.LayoutParams(galleryIcon.getWidth(), galleryIcon.getHeight()); lp.addRule(RelativeLayout.ALIGN_PARENT_END); lp1.addRule(RelativeLayout.ALIGN_PARENT_END); lp2.addRule(RelativeLayout.ALIGN_PARENT_END); lp3.addRule(RelativeLayout.ALIGN_PARENT_END); lp.setMargins(0, (int) (scale * (346 + iconMarginConstant) + 0.5f - movieDetailsInfoScrollY), (int) (scale * 15 + 0.5f), 0); moreIcon.setLayoutParams(lp); }
From source file:de.sourcestream.movieDB.controller.CastDetails.java
/** * Updates the icons position when called. *//*from ww w . j av a2 s . co m*/ public void updateIconDownPos() { RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight()); RelativeLayout.LayoutParams lp3 = new RelativeLayout.LayoutParams(galleryIcon.getWidth(), galleryIcon.getHeight()); lp1.addRule(RelativeLayout.ALIGN_PARENT_END); lp3.addRule(RelativeLayout.ALIGN_PARENT_END); lp1.setMargins(0, (int) (scale * (506 + iconMarginConstant - iconMarginLandscape + iconConstantSpecialCase) + 0.5f), (int) (scale * 23 + 0.5f), 0); homeIcon.setLayoutParams(lp1); lp3.setMargins(0, (int) (scale * (506 + iconMarginConstant - iconMarginLandscape + iconConstantSpecialCase) + 0.5f), (int) (scale * 23 + 0.5f), 0); galleryIcon.setLayoutParams(lp3); }
From source file:de.sourcestream.movieDB.controller.CastDetails.java
/** * Updates the icons position when called. *//*from ww w . j a v a2 s . c o m*/ public void updateIconUpPos() { RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight()); RelativeLayout.LayoutParams lp3 = new RelativeLayout.LayoutParams(galleryIcon.getWidth(), galleryIcon.getHeight()); lp1.addRule(RelativeLayout.ALIGN_PARENT_END); lp3.addRule(RelativeLayout.ALIGN_PARENT_END); lp1.setMargins(0, (int) (scale * (439 + iconMarginConstant - iconMarginLandscape + iconConstantSpecialCase) + 0.5f), (int) (scale * 23 + 0.5f), 0); homeIcon.setLayoutParams(lp1); lp3.setMargins(0, (int) (scale * (383.3 + iconMarginConstant - iconMarginLandscape + iconConstantSpecialCase) + 0.5f), (int) (scale * 23 + 0.5f), 0); galleryIcon.setLayoutParams(lp3); }
From source file:de.sourcestream.movieDB.controller.CastDetails.java
/** * Updates the icons position in the movie info tap when called. *///from w ww . j a v a2s . c om public void updateIconUpPosInInfoTab() { RelativeLayout.LayoutParams p3 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight()); RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(galleryIcon.getWidth(), galleryIcon.getHeight()); p3.addRule(RelativeLayout.ALIGN_PARENT_END); p.addRule(RelativeLayout.ALIGN_PARENT_END); if (iconDirection == 1) { p3.addRule(RelativeLayout.ABOVE, R.id.moreIcon); p3.setMargins(0, 0, (int) (23 * scale), (int) (44 * scale)); p.addRule(RelativeLayout.ABOVE, R.id.homeIcon); p.setMargins(0, 0, (int) (23 * scale), (int) (15.5f * scale)); } else { p3.addRule(RelativeLayout.BELOW, R.id.moreIcon); p3.setMargins(0, (int) (16 * scale), (int) (23 * scale), 0); p.addRule(RelativeLayout.BELOW, R.id.homeIcon); p.setMargins(0, (int) (15.5f * scale), (int) (23 * scale), 0); } castDetailsInfo.getHomeIcon().setLayoutParams(p3); castDetailsInfo.getGalleryIcon().setLayoutParams(p); }
From source file:de.sourcestream.movieDB.controller.MovieDetails.java
/** * Updates the icons position when called. *//*from w w w . j a va 2s .co m*/ public void updateIconDownPos() { RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight()); RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(trailerIcon.getWidth(), trailerIcon.getHeight()); RelativeLayout.LayoutParams lp3 = new RelativeLayout.LayoutParams(galleryIcon.getWidth(), galleryIcon.getHeight()); lp1.addRule(RelativeLayout.ALIGN_PARENT_END); lp2.addRule(RelativeLayout.ALIGN_PARENT_END); lp3.addRule(RelativeLayout.ALIGN_PARENT_END); lp1.setMargins(0, (int) (scale * (506 + iconMarginConstant - iconMarginLandscape + iconConstantSpecialCase) + 0.5f), (int) (scale * 23 + 0.5f), 0); homeIcon.setLayoutParams(lp1); lp2.setMargins(0, (int) (scale * (506 + iconMarginConstant - iconMarginLandscape + iconConstantSpecialCase) + +0.5f), (int) (scale * 23 + 0.5f), 0); trailerIcon.setLayoutParams(lp2); lp3.setMargins(0, (int) (scale * (506 + iconMarginConstant - iconMarginLandscape + iconConstantSpecialCase) + 0.5f), (int) (scale * 23 + 0.5f), 0); galleryIcon.setLayoutParams(lp3); }
From source file:de.sourcestream.movieDB.controller.MovieDetails.java
/** * Updates the icons position when called. *//*from w w w. j ava 2s . c o m*/ public void updateIconUpPos() { RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight()); RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(trailerIcon.getWidth(), trailerIcon.getHeight()); RelativeLayout.LayoutParams lp3 = new RelativeLayout.LayoutParams(galleryIcon.getWidth(), galleryIcon.getHeight()); lp1.addRule(RelativeLayout.ALIGN_PARENT_END); lp2.addRule(RelativeLayout.ALIGN_PARENT_END); lp3.addRule(RelativeLayout.ALIGN_PARENT_END); lp1.setMargins(0, (int) (scale * (439 + iconMarginConstant - iconMarginLandscape + iconConstantSpecialCase) + 0.5f), (int) (scale * 23 + 0.5f), 0); homeIcon.setLayoutParams(lp1); lp2.setMargins(0, (int) (scale * (383.3 + iconMarginConstant - iconMarginLandscape + iconConstantSpecialCase) + 0.5f), (int) (scale * 23 + 0.5f), 0); trailerIcon.setLayoutParams(lp2); lp3.setMargins(0, (int) (scale * (328.3 + iconMarginConstant - iconMarginLandscape + iconConstantSpecialCase) + 0.5f), (int) (scale * 23 + 0.5f), 0); galleryIcon.setLayoutParams(lp3); }
From source file:de.sourcestream.movieDB.controller.TVDetails.java
/** * Updates the icons position in the movie info tap when called. *//*from w w w . j a va 2 s . c o m*/ public void updateIconUpPosInInfoTab() { RelativeLayout.LayoutParams p3 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight()); RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(galleryIcon.getWidth(), galleryIcon.getHeight()); p3.addRule(RelativeLayout.ALIGN_PARENT_END); p.addRule(RelativeLayout.ALIGN_PARENT_END); if (iconDirection == 1) { p3.addRule(RelativeLayout.ABOVE, R.id.moreIcon); p3.setMargins(0, 0, (int) (23 * scale), (int) (44 * scale)); p.addRule(RelativeLayout.ABOVE, R.id.homeIcon); p.setMargins(0, 0, (int) (23 * scale), (int) (15.5f * scale)); } else { p3.addRule(RelativeLayout.BELOW, R.id.moreIcon); p3.setMargins(0, (int) (16 * scale), (int) (23 * scale), 0); p.addRule(RelativeLayout.BELOW, R.id.homeIcon); p.setMargins(0, (int) (15.5f * scale), (int) (23 * scale), 0); } tvDetailsInfo.getHomeIcon().setLayoutParams(p3); tvDetailsInfo.getGalleryIcon().setLayoutParams(p); }
From source file:de.sourcestream.movieDB.controller.MovieDetails.java
/** * Updates the icons position in the movie info tap when called. *//*from w ww. ja v a 2 s . c o m*/ public void updateIconUpPosInInfoTab() { RelativeLayout.LayoutParams p3 = new RelativeLayout.LayoutParams(homeIcon.getWidth(), homeIcon.getHeight()); RelativeLayout.LayoutParams p2 = new RelativeLayout.LayoutParams(trailerIcon.getWidth(), trailerIcon.getHeight()); RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(galleryIcon.getWidth(), galleryIcon.getHeight()); p3.addRule(RelativeLayout.ALIGN_PARENT_END); p2.addRule(RelativeLayout.ALIGN_PARENT_END); p.addRule(RelativeLayout.ALIGN_PARENT_END); if (iconDirection == 1) { p3.addRule(RelativeLayout.ABOVE, R.id.moreIcon); p3.setMargins(0, 0, (int) (23 * scale), (int) (44 * scale)); p2.addRule(RelativeLayout.ABOVE, R.id.homeIcon); p2.setMargins(0, 0, (int) (23 * scale), (int) (15.5f * scale)); p.addRule(RelativeLayout.ABOVE, R.id.trailerIcon); p.setMargins(0, 0, (int) (23 * scale), (int) (15 * scale)); } else { p3.addRule(RelativeLayout.BELOW, R.id.moreIcon); p3.setMargins(0, (int) (16 * scale), (int) (23 * scale), 0); p2.addRule(RelativeLayout.BELOW, R.id.homeIcon); p2.setMargins(0, (int) (15.5f * scale), (int) (23 * scale), 0); p.addRule(RelativeLayout.BELOW, R.id.trailerIcon); p.setMargins(0, (int) (15 * scale), (int) (23 * scale), 0); } movieDetailsInfo.getHomeIcon().setLayoutParams(p3); movieDetailsInfo.getTrailerIcon().setLayoutParams(p2); movieDetailsInfo.getGalleryIcon().setLayoutParams(p); }