question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:open
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
shifatul-icommented, Aug 3, 2016

@ngocht143 you can find all the required methods here -> AndroidSwipeableCardStack/CardStack/src/main/java/com/wenchao/cardstack/CardUtils.java

0reactions
ngocht143commented, Aug 4, 2016

@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

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found