Updated cloneParams method for better performance in Latest Devices
See original GitHub issue public static RelativeLayout.LayoutParams cloneParams(RelativeLayout.LayoutParams params) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
return new LayoutParams(params);
} else {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(params.width, params.height);
layoutParams.leftMargin = params.leftMargin;
layoutParams.topMargin = params.topMargin;
layoutParams.rightMargin = params.rightMargin;
layoutParams.bottomMargin = params.bottomMargin;
int[] rules = params.getRules();
for (int i = 0; i < rules.length; i++)
layoutParams.addRule(i, rules[i]);
//layoutParams.setMarginStart(params.getMarginStart());
//layoutParams.setMarginEnd(params.getMarginEnd());
return layoutParams;
}
}
Thanks to @GadgetCheck from https://github.com/GadgetCheck/TinderView
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Solved: Clone script problem - New-VM : Parameter set can...
Solved: Hello. First time post, so please be kind. Running into hella errors trying various methods to run this script: $cloneparams =
Read more >community/0084-endtoend-provenance-collection.md at main
The objective in this proposal is to build technologies that complement and ... Ensure performance impact on pipeline execution is minimum ...
Read more >Migrating from Jenkins to OpenShift Pipelines or Tekton
OpenShift Pipelines adopts a 'container-first' approach, where every step ... oc new-project helloworldproject oc project helloworldproject oc process -f ...
Read more >Web Technologies → SqlHelper Class - Cuitutorial
Make a new class with the name of SqlHelper in any of your project folder and copy the ... The SqlHelper class is...
Read more >On using "using" and "finally" to cleanup resources
SqlParameter)); // Execute the stored procedure and retrieve the results in the table. using (SqlDataAdapter dataAdapter = new ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ngocht143 you can find all the required methods here -> AndroidSwipeableCardStack/CardStack/src/main/java/com/wenchao/cardstack/CardUtils.java
@wenchaojiang Yeah, i mean i want to use your lib, contain imageview which can zoom in (out), but it didn’t handle zoom touch event