Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the issue brought up in #68 #69

Merged
merged 2 commits into from
May 17, 2018
Merged

Fixes the issue brought up in #68 #69

merged 2 commits into from
May 17, 2018

Conversation

4lch4
Copy link
Contributor

@4lch4 4lch4 commented May 17, 2018

PR Request to fix issue #68

What's it do?

As the heading states, this PR will fix the issue brought up by vinayakkgarg, where they discovered the Settings button in the toolbar was not doing anything when clicked.

What was wrong?

After looking into the code, I realized when a user clicks the button, the method it hits returns true without actually doing anything:

@Override 
public boolean onOptionsItemSelected(MenuItem item) { 
    // Handle action bar item clicks here. The action bar will 
    // automatically handle clicks on the Home/Up button, so long 
    // as you specify a parent activity in AndroidManifest.xml. 
    int id = item.getItemId(); 
 
    //noinspection SimplifiableIfStatement 
    if (id == R.id.action_settings) { 
        return true; 
    } 
 
    return super.onOptionsItemSelected(item); 
}

How's it fix it?

  1. I tried removing the menu and the code associated (such as the method shown above) but then the toolbar was looking wonky and out of shape.

  2. To fix the toolbar I downloaded an svg of the DigitalOcean logo and after cleaning it up a bit added it to the project for the new @drawable/ic_digitalocean.

  3. Lastly, I had to adjust the measurements for the toolbar in order to have margins on smaller screens so it's not too cramped.

4lch4 added 2 commits May 16, 2018 23:24
This allows for the image to scale infinitely with all devices and is easier to manage.
@codecov
Copy link

codecov bot commented May 17, 2018

Codecov Report

Merging #69 into master will decrease coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #69      +/-   ##
============================================
- Coverage     12.74%   12.67%   -0.07%     
+ Complexity       48       47       -1     
============================================
  Files            82       82              
  Lines          1868     1862       -6     
  Branches         92       91       -1     
============================================
- Hits            238      236       -2     
+ Misses         1618     1614       -4     
  Partials         12       12
Impacted Files Coverage Δ Complexity Δ
...sc/digitaloceanapp/activities/DropletActivity.java 40.86% <ø> (+0.37%) 5 <0> (-1) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98ddba5...b34ac40. Read the comment docs.

@championswimmer championswimmer merged commit 3c70b16 into coding-blocks:master May 17, 2018
@championswimmer
Copy link
Contributor

Thank you @alcha !!

@4lch4
Copy link
Contributor Author

4lch4 commented May 17, 2018

No problem @championswimmer, just happy to help!

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

Successfully merging this pull request may close these issues.

2 participants