1. Error generating final archive: Debug certificate expired on Solution
In the eclipse menu window-> preferences-> Android-> build, findDefault debug keystoreThe displayed path is debug. the keystore file (expired) has expired. Therefore, you only need to delete this debug file in either Windows or Linux. the keystore is enough. eclipse will automatically generate a new one. The default validity period is also one year.
2. Open the mobile phone log
Enter ** # * #2846579 # * in the dialing interface to enter the test menu.
Project menu-background settings-Log Settings
Log switch-log enable log level settings-verbose
Dump & log-select all
Restart mobile phone
3. Use a custom Chinese font in Android
Android2.3 and later versions do not have this problem
In versions earlier than Android, you can change the font extension and put the file into assets. The extension that can be modified. (Why is the version earlier than 2.3 unavailable? A search on the Network !)
".Jpg ", ".jpeg", ".png ", ".gif", ".wav ",". MP2 ", Comment comment", comment .ogg ",". AAC ",". MPG ",". MPEG ",". mid ",". midi ",". SMF ",". jet ",". rtttl ",". IMy ",". xmf ", 2.16.mp4", ". m4a ",". m4v ",". 3GP ",". 3GPP ",". 3g2 ",". 3gpp2 ",". amr ",". AWB ", 2.16.wma", ". WMV"
The Code is as follows:
Typeface face=Typeface.createFromAsset(getAssets(),"fonts/STXINGKA.jpg"); tv.setTypeface(face);
4. Add Borders to imageview
// Override the plotting method @ override protected void ondraw (canvas) {super. ondraw (canvas); // draw the border rect = canvas. getclipbounds (); rect. bottom --; rect. right --; paint = new paint (); paint. setcolor (bordercolor); paint. setstyle (paint. style. stroke); paint. setstrokewidth (borderwidth); canvas. drawrect (rect, paint );}
5. troubleshooting of nested viewpager in listview
Http://blog.csdn.net/zglslyg/article/details/8480460
6. Click events and perfect fillafter of the gradient Animation
Http://www.cnblogs.com/eoiioe/archive/2012/08/29/2662546.html
7. Use custom view to internal class
Class Name public static
<viewandroid:id="@+id/example_view_anim_iamgeview"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"class="com.zjd.example.app.CustomViewActivity$MyImageView"android:background="@drawable/example_ui_chip0" />
8. String. Format () Escape output %
Http://www.cnblogs.com/xytop/articles/1277125.html