To create custom buton, create a XML file under drawable folder. drawable/colorbutton.xml android:angle="…
قراءة المزيدIt's a improved version of the example " Play animated GIF using android.graphics.Movie, with Movie.decodeStream(InputStream) ". - Add …
قراءة المزيدTo make a layout in square shape, with equal width and height, we can re-assign LayoutParams.width and height of our layout in OnGlobalLayoutListener…
قراءة المزيدIn last post , we re-layout the views when the global layout state within the view tree changes, with OnGlobalLayoutListener. But once re-layout the …
قراءة المزيدThis example insert our custom view to a GridLayout (Added in API level 14) dynamically in Java code, and set the width of height evenly. Modify lay…
قراءة المزيدLast post " Custom View, detect touch to toggle color " and also " warning: custom view overrides onTouchEvent but not performClick an…
قراءة المزيدThis example implement a custom view, it have only one function, toggle color if user touched. Create MyView.java package com.example.androidtouchvie…
قراءة المزيدIt is another approach to do the same job as the previous example " Use CountDownTimer to do something repeatly, updating custom view ". In…
قراءة المزيدThis example show how to change color spots in custom view repeatly with CountDownTimer . We also implement callback interface on MainActivity.java,…
قراءة المزيدFurther modify the example of " Change speed of Animation follow touch path " to add feature of animation direction, forward and backward. …
قراءة المزيدThis exercise change the speed of the former example of " Animation follow touch path ". The speed is base on the approximate frame-per-sec…
قراءة المزيدThis example show how to draw rotated path by roatating canvas. //Save and rotate canvas canvas.save(); canvas.rotate(rotate, x, y); canvas…
قراءة المزيدExample to rotate Path with Matrix: matrix.postRotate(rotate, x, y); path.transform(matrix); Modify to rotate the example in " Fill Path wit…
قراءة المزيدFollow the former post " Animation follow touch path ". The example show how to draw animation follow user touch path. Always one step in e…
قراءة المزيد
Social Plugin