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

Adding back button in settings activity #369

Closed
wants to merge 6 commits into from
Closed

Conversation

htg2704
Copy link

@htg2704 htg2704 commented Mar 10, 2020

Closes #367

What has been done to verify that this works as intended?

Checked on physical device

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Creates better user experience

Before submitting this PR, please make sure you have:

  • run ./gradlew checkCode and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.

Copy link
Contributor

@ajay-prabhakar ajay-prabhakar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sending PR @htg2704, I just gave some suggestion
please run ./gradlew checkcode locally so, you will get a detailed explanation of where you are getting an error

@Override
public void onClick(View v) {
try {
Intent intent = new Intent(SettingsActivity.this, MainActivity.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are giving intent here, it is not actually the good practice because if the user click back once again it will come to settingsActivity
please try this

        toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.back_arrow));
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });

android:configChanges="orientation|screenSize"
android:parentActivityName=".views.ui.send.SendFormsActivity"
>
<meta-data
Copy link
Contributor

@ajay-prabhakar ajay-prabhakar Mar 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add metadata for this change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the needful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can understand that, can you rephrase that

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed configChanges for now. It wasn,t needed for this commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still can see in the file changes can you please check that

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not there for me, shall I send a new pr?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to do new PR you still can work on this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please run ./gradlew checkcode locally


addPreferencesFromResource(R.xml.preferences_menu);
addPreferences();
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you removed this

@@ -244,6 +258,5 @@ public void afterTextChanged(Editable s) {
alertDialog.setCancelable(true);
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid blank spaces

@@ -45,7 +46,11 @@
android:value=".views.ui.main.MainActivity" />
</activity>
<activity android:name=".views.ui.instance.InstancesList" />
<activity android:name=".views.ui.settings.SettingsActivity" />
<activity android:name=".views.ui.settings.SettingsActivity"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert whatever changes you did in manifest file, as there is no need

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add back button to settings activity
2 participants