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

Update core functionality to higher APIs #6

Closed
wants to merge 1 commit into from
Closed

Update core functionality to higher APIs #6

wants to merge 1 commit into from

Conversation

jesdga95
Copy link

Give it a bit more of "Holo" look and usability.

  • Fix code styling based on Android guidelines
  • Changed DropDownItem by PopupMenu (I'm not sure if we can set icons, but
    it adapts to new APIs)
  • Window.hasMoved(), and Window.setMoved(boolean) methods. This helps to
    determine whether if window has been moved atleast once. It could be useful
    to implement custom onTouch methods (Example: A video player that play/stops on
    touch but you don't want it to play/stop when you're dragging and dropping it)
  • Renamed FLAG_ADD_FUNCTIONALITY_DROP_DOWN_DISABLE to
    FLAG_ADD_FUNCTIONALITY_POPUP_MENU_DISABLE (See above)
  • Add ability to pass data bundles on show() method (Ex: for apps willing to
    use intent filters)
  • Add ability to perform haptic feedback on MotionEvent.ACTION_DOWN for both
    body and title bar (also changed a bit behavior of FLAG_DECORATION_MOVE_DISABLE)
  • Remove hardcoded strings on most (all ?) of the places
  • Removed some drawables and use holo ones
  • Layout fixes (as updating fill_parent to match_parent)
  • Fix android doc on some methods
  • Updated some code following ide suggestions
  • Update API usage to min 15, target 16 (ICS, Jellybean)

@jesdga95
Copy link
Author

I'm not sure if this should be merged on another branch other than "master", if you want to keep retro compatibility with Older apis as froyo or gingerbread, but atleast give it a look. This looks really solid on jellybean

Give it a bit more of "Holo" look and usability.

* Fix code styling based on Android guidelines
* Changed DropDownItem by PopupMenu (I'm not sure if we can set icons, but
  it adapts to new APIs)
* Window.hasMoved(), and Window.setMoved(boolean) methods. This helps to
  determine whether if window has been moved atleast once. It could be useful
  to implement custom onTouch methods (Example: A video player that play/stops on
  touch but you don't want it to play/stop when you're dragging and dropping it)
* Renamed FLAG_ADD_FUNCTIONALITY_DROP_DOWN_DISABLE to
  FLAG_ADD_FUNCTIONALITY_POPUP_MENU_DISABLE (See above)
* Add ability to pass data bundles on show() method (Ex: for apps willing to
  use intent filters)
* Add ability to perform haptic feedback on MotionEvent.ACTION_DOWN for both
  body and title bar (also changed a bit behavior of FLAG_DECORATION_MOVE_DISABLE)
* Remove hardcoded strings on most (all ?) of the places
* Removed some drawables and use holo ones
* Layout fixes (as updating fill_parent to match_parent)
* Fix android doc on some methods
* Updated some code following ide suggestions
* Update API usage to min 15, target 16 (ICS, Jellybean)
@pingpongboss
Copy link
Owner

The minSdk must not change due to backwards compatibility. I will check out your changes and see if anything can be done to keep backwards compatibility. Thanks for your contribution.

@pingpongboss
Copy link
Owner

Oops that close button is too easy to click

@pingpongboss
Copy link
Owner

did you forget to git add your drawables? You've removed close.png and hide.png, but have not added your own.

@pingpongboss
Copy link
Owner

Hi D4rKn3sSyS, looking at this further, I've determined that it is too unwieldily to merge. I am going to refactor the code base so that not everything is inside of StandOutWindow.java. I encourage you to apply your changes again after that. But I urge you strongly to make multiple logical commits. IE: Each commit is for a different bug/feature (you can use commit --amend to avoid spurious commits). That will be much easier to merge.

I can't merge this because EVERY LINE of StandOutWindow.java is reported to have been changed, so I can't see what has happened.

I am closing this now, but I'll ping you later when I've refactored this. Thanks.

@jesdga95
Copy link
Author

Changes are basically made on show() method, documentation, some drawables removed (used now from frameworks to fit holo style), and finally popup menu instead of the inflating method of dropdown. The rest is purely fix indenting, that's why git reports like if line was rewritten. I'll wait your ping then ;)

@jesdga95
Copy link
Author

Oh, and now there's a new flag, wich adds Vibration to ACTION_DOWN event, just like commit msg says :). About SDK, well you want to keep retrocompatibility and that's fine, but API has changed a lot since eclair, you're using those drawables, and they don't fit at all on jellybean design, that's why I said, if this some day gets merged, I guess you should make a new branch, something like "API15+"

@pingpongboss
Copy link
Owner

I have refactored the code. You may submit another patch now. Try to keep the commits small and in in logical chunks. Thanks for your contribution

@pingpongboss
Copy link
Owner

what exactly needs API15+? Just the drawables?

@jesdga95
Copy link
Author

No, drawables can be copied, PopupMenu changed its look and added new methods on API15

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.

None yet

2 participants