Android Issues 总结
Last updated on May 7, 2023 pm
[TOC]
- http://stackoverflow.com/questions/8744994/android-camera-set-resolution
- http://stackoverflow.com/questions/10913181/camera-preview-is-not-restarting
- http://stackoverflow.com/questions/10913682/how-to-capture-and-save-an-image-using-custom-camera-in-android
- http://stackoverflow.com/questions/11121963/how-can-i-set-camera-preview-size-to-squared-aspect-ratio-in-a-squared-surfacevi
DateTimePicker Control
- http://blog.csdn.net/u012246458/article/details/49800271
- http://blog.csdn.net/csdnadcode/article/details/39555519
- http://blog.csdn.net/njweiyukun/article/details/50338183
自定义对话框
- http://www.cnblogs.com/weixing/archive/2013/08/14/3257077.html
- http://blog.csdn.net/fancylovejava/article/details/21617553
How to draw rectangle in XML?
We can create a new XML file inside the drawable folder, and add the following code, then save it as rectangle.xml.
1 |
|
To use it inside a layout we would set the android:background attribute to the new drawable shape,like the following code segment.
1 |
|
finally,have a fun!
Link: http://stackoverflow.com/questions/10124919/can-i-draw-rectangle-in-xml
How to change "shape"(in XML) color dynamically?
The "Shape" code in circle2.xml is as like the following segments:
1 |
|
The code using "Shape" is as follows:
1 |
|
And we can modify the "Shape" color simply like this:
1 |
|
Note: It must be the attribute android:background of ImageView that use the "Shape" as long as we modify the "Shape" color like that!
Link: http://stackoverflow.com/questions/7164630/how-to-change-shape-color-dynamically
Android设置textView水平居中显示
- 让textView里面的内容水平居中:android:gravity="center_horizontal"
- 让textView控件在它的父布局里水平居中:android:layout_gravity="center_horizontal"
Using lists in Android (ListView) - Tutorial
Link: http://www.vogella.com/tutorials/AndroidListView/article.html