Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Add app closing with double tap on back button #16

Closed
fartem opened this issue Jan 19, 2021 · 10 comments · Fixed by #66
Closed

Add app closing with double tap on back button #16

fartem opened this issue Jan 19, 2021 · 10 comments · Fixed by #66
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects

Comments

@fartem
Copy link
Member

fartem commented Jan 19, 2021

Right now you can exit from the app by tap on back button and press "Exit now" from showed bottom sheet. Replace this behaviour by exit from the application by double tap.

@fartem fartem added help wanted Extra attention is needed good first issue Good for newcomers labels Jan 19, 2021
@fartem fartem added this to To do in 1.1.0 Jan 21, 2021
@jayagrawal254
Copy link
Contributor

I adding in my code in app/src/main/java/components/dialogs/system/ AppSnackbar.java
is it correct

@jayagrawal254
Copy link
Contributor

`private long backpressedTime;
@OverRide
protected void onCreate(Bundle SavedInstanceState){
super.onCreate(SavedInstanceState);
setContentView(R.layout.activity_main);
}

    @override
    public void onBackpressed()   {
            if(backpressedTime + 2000 > System.currentTimeMillis()){
                 super.onBackpressed();
                 return;
            }else{
                    Tost.makeText(getBaseContent(),"Press back again to exit",Tost.LENGTH_SHORT).show();
            }
    } `

@fartem fartem added this to To do in 1.0.8 May 8, 2021
@fartem fartem removed this from To do in 1.0.8 May 9, 2021
@yasin459
Copy link
Contributor

hello i would like to work on this issue

@fartem
Copy link
Member Author

fartem commented May 12, 2021

@yasin459 I'm assigned you to this issue.

@yasin459
Copy link
Contributor

yasin459 commented May 13, 2021

hello again .sorry but i have a problem in build, I get this error :
A problem occurred evaluating project ':app'.

java.lang.NullPointerException (no error message)
i googled but I can't understand the problem, do you have any idea?

@yasin459
Copy link
Contributor

@fartem can you help me please?

@fartem
Copy link
Member Author

fartem commented May 13, 2021

@yasin459 Of course. Can you tell me your answer?

@yasin459
Copy link
Contributor

@fartem
i have'nt done anything yet, i forked and cloned repo then tried to build for the first time(before making any changes)
then I confronted this error:

image

@fartem
Copy link
Member Author

fartem commented May 14, 2021

@yasin459 You need to add next lines to local.properties file in the root of the project:

RELEASE_KEYSTORE_PATH=''
RELEASE_KEYSTORE_PASSWORD=''
RELEASE_KEY_ALIAS=''
RELEASE_KEY_PASSWORD=''

When project building, Gradle read build config and configuration contains sign variables, than you should add to your Gradle settings (all variables is empty because they are using when you building release app version). But if you just run the app in debug flavor, this exception cannot be caused.

@fartem fartem linked a pull request May 15, 2021 that will close this issue
4 tasks
@fartem fartem removed this from To do in 1.1.0 May 17, 2021
@fartem fartem added this to To do in 1.2.0 May 17, 2021
@vipozdn
Copy link
Contributor

vipozdn commented May 24, 2021

Need some help? If you are no longer working with this feature, please assign it to me

@fartem fartem moved this from To do to Done in 1.2.0 May 30, 2021
@fartem fartem removed this from Done in 1.2.0 May 30, 2021
@fartem fartem added this to Done in 1.1.0 May 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
No open projects
1.1.0
Done
Development

Successfully merging a pull request may close this issue.

4 participants