Giter VIP home page Giter VIP logo

Comments (2)

fookwood avatar fookwood commented on August 16, 2024

Android为了进行多屏幕的适配,把这个搞的有点复杂

可以看到在DynamicGrid这个类里面,他事先定义了很多设备的行数、列数、icon大小、hotseat Icon大小等等,这些保存在DeviceProfile中,每个设备对应一个DeviceProfile对象。

当你运行在一台手机上的时候,他会根据上面的数据推测出现在的屏幕用什么样的行数和列数比较好。这个推测过程就是在invDistWeightedInterpolate中完成的,它使用了一个机器学习算法,K Nearest Neighbor,http://coolshell.cn/articles/8052.html 你可能需要研究一下。理论上碰到什么样的分辨率都不用怕了

如果你要要自己定义一个图标的尺寸大小,横向竖向的数量,自己建立一个DeviceProfile替代DynamicGrid的mProfile就好了,但是你可以要自己处理多屏幕适配,理论上是OK的,你可以试试。

from launcher3.

xiongliangshan avatar xiongliangshan commented on August 16, 2024

好的 ,我试试

from launcher3.

Related Issues (20)

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.