Recently, the company organized project team members to develop an Android project demo, no one has andoid development experience, are developing C #. Although the project requirements are not very high, but for those who do not have this experience, the first step is the most difficult.
The project lasted one months, 4 people developed, the final line into a usable demo, the overall effect is very good. This one borrowed from the online "Imitation NetEase client Demo" There is also learning "Crazy Android", a lot of harvest, here use a few articles to do a project experience summary, there is more from C #
Programmer's point of view to understand some of the similarities and differences of Android.
Article directory:
CSharp programmers Learn Android Development---1. Andriodide, master tools use CSharp Programmer to learn Android development---2. The shortcut keys for personal Summary csharp programmer learn Android Development---3.Android internal elements do not populate bugs
Case: Layout Error:
First of all, this problem is one of the difficulties encountered in the development of the project, Baidu's solution is not much, the final bubble on the StackOverflow found the answer.
The red part of the figure is the part that the picture is supposed to fill, but it is not filled with the background red, and the two blue lines on the right are the same. Believe that many people have encountered this problem, so do not want to say that the element attribute is already fill_parent or match_parent, in some cases, the fill_parent will be invalid.
Finally, the joy is in a few hours of trying, search after finally found the problem, this is layout of a bug, has been submitted to the official Android, probably the problem is, in some cases, the control does not refresh itself to the size of the result.
Here are the steps to resolve:
1. Replace the fill_parent with the Match_parent
2. Set parameters android:adjustviewbounds= "true" and Android:scaletype= "Fitxy" in ImageView, all ImageView are recommended.
or Img.setscaletype (SCALETYPE.FIT_XY); Img.setadjustviewbounds (TRUE);
Eventually, all the pictures are really "filled", and the principle is to force the picture to refresh itself, which could lead to some efficiency problems.
Reference
BUG: Workaround for layout error when one of the controls in the layout is gone: http://android-developers.blogspot.com/2009/02/android-layout-tricks-1.html
Elements in Bug:linearlayout are not fillbug:http://stackoverflow.com/questions/5403970/ Imageview-adjustviewbounds-does-not-work-with-layout-height-fill-parent
Http://stackoverflow.com/questions/16462407/android-imageview-from-url-wont-fill-parent-in-listview
CSharp programmers Learn Android development---3.Android internal elements are not populated with bugs