Change black color when scale first activity during transition












0















I want to change the black color (outside activity) when scale activity during transition (eg: I want to make change it to white). You can see the black color in the image below



enter image description here



Here is my code



slide_up.xml



<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/activity_transition_time"
>
<translate
android:fromYDelta="100%p"
android:toYDelta="0"/>
<alpha
android:fromAlpha="0.5"
android:toAlpha="1"/>
</set>


scale_down.xml



<set xmlns:android="http://schemas.android.com/apk/res/android"
>
<scale
android:duration="@integer/activity_transition_time"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="0.8"
android:pivotX="50%p"
android:pivotY="50%p"
android:toYScale="0.8" />
<alpha
android:fromAlpha="1"
android:toAlpha="0.6"
/>
</set>


FirstActivity.java



startActivity(new Intent(this, SecondActivity.class));
overridePendingTransition(R.anim.slide_up, R.anim.anim_scale_down);


style.xml



<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">


Can I do it or is there any other approach? Any help or suggestion would be great appreciated.










share|improve this question

























  • try adding <item name="android:windowIsTranslucent">true</item> to your theme.

    – Karan Mer
    Nov 15 '18 at 6:43











  • @KaranMer when adding android:windowIsTranslucent the black become transparent (and I still don't know how to change it to another color)

    – Linh
    Nov 15 '18 at 6:45











  • i implement one example but in this example new activity come bottom to up and current activity show as it is if you want example i can provide you @PhanVanLinh

    – Ali
    Nov 15 '18 at 6:49











  • @MohammadAli do you scale down the first activity?

    – Linh
    Nov 15 '18 at 6:50













  • not sure but please try this line <translate android:fromYDelta="0%p" android:toYDelta="0" android:duration="400"/> in scale_down.xml file but first comment your code.

    – Ali
    Nov 15 '18 at 6:58
















0















I want to change the black color (outside activity) when scale activity during transition (eg: I want to make change it to white). You can see the black color in the image below



enter image description here



Here is my code



slide_up.xml



<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/activity_transition_time"
>
<translate
android:fromYDelta="100%p"
android:toYDelta="0"/>
<alpha
android:fromAlpha="0.5"
android:toAlpha="1"/>
</set>


scale_down.xml



<set xmlns:android="http://schemas.android.com/apk/res/android"
>
<scale
android:duration="@integer/activity_transition_time"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="0.8"
android:pivotX="50%p"
android:pivotY="50%p"
android:toYScale="0.8" />
<alpha
android:fromAlpha="1"
android:toAlpha="0.6"
/>
</set>


FirstActivity.java



startActivity(new Intent(this, SecondActivity.class));
overridePendingTransition(R.anim.slide_up, R.anim.anim_scale_down);


style.xml



<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">


Can I do it or is there any other approach? Any help or suggestion would be great appreciated.










share|improve this question

























  • try adding <item name="android:windowIsTranslucent">true</item> to your theme.

    – Karan Mer
    Nov 15 '18 at 6:43











  • @KaranMer when adding android:windowIsTranslucent the black become transparent (and I still don't know how to change it to another color)

    – Linh
    Nov 15 '18 at 6:45











  • i implement one example but in this example new activity come bottom to up and current activity show as it is if you want example i can provide you @PhanVanLinh

    – Ali
    Nov 15 '18 at 6:49











  • @MohammadAli do you scale down the first activity?

    – Linh
    Nov 15 '18 at 6:50













  • not sure but please try this line <translate android:fromYDelta="0%p" android:toYDelta="0" android:duration="400"/> in scale_down.xml file but first comment your code.

    – Ali
    Nov 15 '18 at 6:58














0












0








0


1






I want to change the black color (outside activity) when scale activity during transition (eg: I want to make change it to white). You can see the black color in the image below



enter image description here



Here is my code



slide_up.xml



<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/activity_transition_time"
>
<translate
android:fromYDelta="100%p"
android:toYDelta="0"/>
<alpha
android:fromAlpha="0.5"
android:toAlpha="1"/>
</set>


scale_down.xml



<set xmlns:android="http://schemas.android.com/apk/res/android"
>
<scale
android:duration="@integer/activity_transition_time"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="0.8"
android:pivotX="50%p"
android:pivotY="50%p"
android:toYScale="0.8" />
<alpha
android:fromAlpha="1"
android:toAlpha="0.6"
/>
</set>


FirstActivity.java



startActivity(new Intent(this, SecondActivity.class));
overridePendingTransition(R.anim.slide_up, R.anim.anim_scale_down);


style.xml



<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">


Can I do it or is there any other approach? Any help or suggestion would be great appreciated.










share|improve this question
















I want to change the black color (outside activity) when scale activity during transition (eg: I want to make change it to white). You can see the black color in the image below



enter image description here



Here is my code



slide_up.xml



<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/activity_transition_time"
>
<translate
android:fromYDelta="100%p"
android:toYDelta="0"/>
<alpha
android:fromAlpha="0.5"
android:toAlpha="1"/>
</set>


scale_down.xml



<set xmlns:android="http://schemas.android.com/apk/res/android"
>
<scale
android:duration="@integer/activity_transition_time"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="0.8"
android:pivotX="50%p"
android:pivotY="50%p"
android:toYScale="0.8" />
<alpha
android:fromAlpha="1"
android:toAlpha="0.6"
/>
</set>


FirstActivity.java



startActivity(new Intent(this, SecondActivity.class));
overridePendingTransition(R.anim.slide_up, R.anim.anim_scale_down);


style.xml



<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">


Can I do it or is there any other approach? Any help or suggestion would be great appreciated.







android android-animation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 8:16







Linh

















asked Nov 15 '18 at 6:37









LinhLinh

21.4k11113141




21.4k11113141













  • try adding <item name="android:windowIsTranslucent">true</item> to your theme.

    – Karan Mer
    Nov 15 '18 at 6:43











  • @KaranMer when adding android:windowIsTranslucent the black become transparent (and I still don't know how to change it to another color)

    – Linh
    Nov 15 '18 at 6:45











  • i implement one example but in this example new activity come bottom to up and current activity show as it is if you want example i can provide you @PhanVanLinh

    – Ali
    Nov 15 '18 at 6:49











  • @MohammadAli do you scale down the first activity?

    – Linh
    Nov 15 '18 at 6:50













  • not sure but please try this line <translate android:fromYDelta="0%p" android:toYDelta="0" android:duration="400"/> in scale_down.xml file but first comment your code.

    – Ali
    Nov 15 '18 at 6:58



















  • try adding <item name="android:windowIsTranslucent">true</item> to your theme.

    – Karan Mer
    Nov 15 '18 at 6:43











  • @KaranMer when adding android:windowIsTranslucent the black become transparent (and I still don't know how to change it to another color)

    – Linh
    Nov 15 '18 at 6:45











  • i implement one example but in this example new activity come bottom to up and current activity show as it is if you want example i can provide you @PhanVanLinh

    – Ali
    Nov 15 '18 at 6:49











  • @MohammadAli do you scale down the first activity?

    – Linh
    Nov 15 '18 at 6:50













  • not sure but please try this line <translate android:fromYDelta="0%p" android:toYDelta="0" android:duration="400"/> in scale_down.xml file but first comment your code.

    – Ali
    Nov 15 '18 at 6:58

















try adding <item name="android:windowIsTranslucent">true</item> to your theme.

– Karan Mer
Nov 15 '18 at 6:43





try adding <item name="android:windowIsTranslucent">true</item> to your theme.

– Karan Mer
Nov 15 '18 at 6:43













@KaranMer when adding android:windowIsTranslucent the black become transparent (and I still don't know how to change it to another color)

– Linh
Nov 15 '18 at 6:45





@KaranMer when adding android:windowIsTranslucent the black become transparent (and I still don't know how to change it to another color)

– Linh
Nov 15 '18 at 6:45













i implement one example but in this example new activity come bottom to up and current activity show as it is if you want example i can provide you @PhanVanLinh

– Ali
Nov 15 '18 at 6:49





i implement one example but in this example new activity come bottom to up and current activity show as it is if you want example i can provide you @PhanVanLinh

– Ali
Nov 15 '18 at 6:49













@MohammadAli do you scale down the first activity?

– Linh
Nov 15 '18 at 6:50







@MohammadAli do you scale down the first activity?

– Linh
Nov 15 '18 at 6:50















not sure but please try this line <translate android:fromYDelta="0%p" android:toYDelta="0" android:duration="400"/> in scale_down.xml file but first comment your code.

– Ali
Nov 15 '18 at 6:58





not sure but please try this line <translate android:fromYDelta="0%p" android:toYDelta="0" android:duration="400"/> in scale_down.xml file but first comment your code.

– Ali
Nov 15 '18 at 6:58












1 Answer
1






active

oldest

votes


















0














You need to use a normal animation instead for the overridePendingTransition and then you can control the animation and do what you need.
Set animation listener to Activity animations






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313741%2fchange-black-color-when-scale-first-activity-during-transition%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You need to use a normal animation instead for the overridePendingTransition and then you can control the animation and do what you need.
    Set animation listener to Activity animations






    share|improve this answer




























      0














      You need to use a normal animation instead for the overridePendingTransition and then you can control the animation and do what you need.
      Set animation listener to Activity animations






      share|improve this answer


























        0












        0








        0







        You need to use a normal animation instead for the overridePendingTransition and then you can control the animation and do what you need.
        Set animation listener to Activity animations






        share|improve this answer













        You need to use a normal animation instead for the overridePendingTransition and then you can control the animation and do what you need.
        Set animation listener to Activity animations







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 '18 at 6:46









        EugeneEugene

        465




        465
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313741%2fchange-black-color-when-scale-first-activity-during-transition%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Florida Star v. B. J. F.

            Danny Elfman

            Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues