Set layout parameter in Java code
2017-03-08 09:44
477 查看
// Get layout param first ViewGroup.LayoutParams photoViewLayoutParameter = mPhotoView.getLayoutParams(); // Set height photoViewLayoutParameter.height = LayoutUtils.getNPercentOfScreenHeightInPixel(IDuApplication.Context, 0.8f); // Set param back to view. mPhotoView.setLayoutParams(photoViewLayoutParameter);
相关文章推荐
- Units Problem: How to read text size as custom attr from xml and set it to TextView in java code
- org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map java.util.Set
- Units Problem: How to read text size as custom attr from xml and set it to TextView in java code
- Units Problem: How to read text size as custom attr from xml and set it to TextView in java code
- Java bytecode edit tool set
- ASM + JASMIN combination for java class file editing in bytecode level
- How to set user-defined-type as Oracle SP input parameter in .NET
- java.lang.NoSuchMethodError: org.apache.commons.validator.Validator.setParameter(Ljava/lang/String;Ljava/lang/Object;)V解决方法
- Parameter passing in Java - by reference or by value?
- a example for calling java code in javascript use dwr
- Configure Javadoc and Source Code for JRE in Eclipse JDT
- Typesafe DSLs in Java: Part 1 — Typesafe Bytecode
- How to tacktrace In Android for Java code
- java.lang.IllegalStateExcetion: Circual dependencies cannot exist in RelativeLayout
- Set in Java Collection
- Use Weka in your Java code
- How to set user-defined-type as Oracle SP input parameter in .NET
- Typesafe DSLs in Java: Part 1 — Typesafe Bytecode
- code set in vc 6.0
- Performing native commands in java code