xuyisheng / androidheroes Goto Github PK
View Code? Open in Web Editor NEWSource code of the book - Android群英传
Source code of the book - Android群英传
比较说12章里用android studio 打不开,似乎是idea运行的,请作者解决!
6.5.1.3节的demo怎么没给源码啊? 严重影响阅读体验啊
视图滑动有问题
In TopBarView,two attrs (title,titleTextColor) are conflict with new SDK.After my building,there are mistakes (Error:(2) Attribute "title" has already been defined) in logcat.So I Correct the attrs,then the project builded correctly.
在FlagBitmapMeshView的flagWave()方法中将Y轴正弦函数偏移量赋值给verts数组时(verts[(j * (WIDTH + 1) + i) * 2 + 1] = orig[(j * WIDTH + i) * 2 + 1] + offsetY * A;),orig数组对应的元素下标应该是j * (WIDTH + 1) + i) * 2 + 1。由于HEIGHT为200,每行像素块的Y轴坐标差不大,导致Demo效果看似正常。如果HEIGHT改为2,Demo效果有明显错误。
第七章中 Anim project 中的timer类中textView的点击事件在api=17的三星模拟器中无效
我把我原来的xml中的onclick删除后,在类中为textview添加了onclickListener()后,成功动画效果
所以我的问题是这里为什么onclick不起作用??
右边布局当内容过多时,头像便会被挤出布局,左边正常。我的处理方法是直接限定图标的大小尺寸,然后将TextView设置android:layout_marginStart="50dp" 属性,即可正常,新手一枚不知说的对否。。嘻嘻。。
P90 图5.3,这是我见过讲的最明白的获取坐标系距离的方法 👍 ;但是 getBottom()
是否标识有误呢?对应该图来讲,我觉得应该是 ViewGroup的顶部 到 View的底部 的距离
,而不是图中最外层的顶部。
望有时间查看,或许是我自己理解的有误
getBottom()的官方说明是:
Bottom position of this view relative to its parent.
经别人提醒.
貌似在书中90页图5.3 中画错了.
第七章 动画 VectorTest里面的 app/src/main/res/anim/anim_earth.xml 这个文件怎么创建的啊,我创建完就提示element objectAnimator must be declared。
这个监听里面的是自己写的interface是设置进去的,所以没有设置的时候点击按钮就会出现空指针错误,希望作者在onclicklistener里面为接口引用加个非空判断
适配器 也就是这个FocusListViewAdapter, 但是没有实现 ViewHodler 实现.不能为了实现动态改变而放弃ViewHodler模式.既然都是用 notifyDataSetChanged() 方法,为啥不用 viewtype 来实现这个效果?
这节讲的是layoutparams实现view的滑动,但是按照
layoutParams.leftMargin = getLeft()+offsetX;
layoutParams.topMargin += getTop()+offsetY;
在这种方法,在安卓4.4上实现却发现,点击view之后会,出现getTop()高度大小的偏移量(
我写的使用使用LinearLayout,将案例一个个view摆上去,但却发现LayoutParams的的滑动效果不正常,偏移了gettop的高度[前面还有3个view,所以正好是3个view的总高度])
以下是正常的代码
layoutParams.leftMargin +=offsetX;
layoutParams.topMargin += offsetY;
不知道,为什么这样子,因为想想逻辑是正常的,希望作者测试一下,因为我用的是安卓4.4
下载下来,字体显示的是乱码
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.