Giter VIP home page Giter VIP logo

optimized-for-chromeos's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

optimized-for-chromeos's Issues

Kotlin Conversion : allow ContextMenuInfo to be null in onCreateContextMenu

Not a bug, but rather something that tripped me up when converting to Kotlin:

override fun onCreateContextMenu(menu: ContextMenu, v: View,
                                 menuInfo: ContextMenu.ContextMenuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo)
    val inflater: MenuInflater = menuInflater
    inflater.inflate(R.menu.context_menu, menu)
}

menuInfo can be null in this case, so to avoid runtime exception, allow it to be nullable in the method signature:
menuInfo: ContextMenu.ContextMenuInfo?

Alt- and Shift- commands

In step 6 "Ctrl- Based Shortcuts", it is stated that:

Support for Ctrl- commands and, on Android O and later, for Alt- and Shift- commands can be added using [dispatchKeyShortcutEvent](https://developer.android.com/reference/android/view/Window.Callback#dispatchKeyShortcutEvent(android.view.KeyEvent)).

I'm not sure what is meant by "on Android O and later". As I read it, Alt- commands won't work on versions before Android O, but when using dispatchKeyShortcutEvent on my Chromebook (that is running Android N / 7.1.1), the method is triggered when pressing e.g. CTRL+A, but also ALT+A (however not SHIFT+A).

ColorStateList can be simplified

ColorStateList colorStateList = new ColorStateList(new int[][]{{}}, new int[]{Color.argb(127, 0, 255, 0)});

new ColorStateList(new int[][]{{}}, new int[]{Color.argb(127, 0, 255, 0)})
could be simplified to
ColorStateList.valueOf(Color.argb(127, 0, 255, 0))
since it only has a default color.

However, I think a better solution would be to utilize ColorStateList further; instead of setting backgroundTintList to this color when hovered and then null when not hovered, show off the ability to use android:state_hovered="true".

Typo in tooltip instructions

So let's add tooltips for each of the photos with the dinosaur's name using the setTootltipText() method.

setTootltipText should be setTooltipText.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.