I made CustomView like under code. ------------------------------------------------------------------- public class CustomView extends View{
protected void onDraw(Canvas canvas){ // Do somthing like drawing Canvas and some logic in NDK } } --------------------------------------------------------------------- and I made layout.xml file like that. ---------------------------------------------------------------------- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ui="http://schemas.android.com/apk/res/ org.sugang.android.priv.keyboard" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <Button android:text="button" android:id="@+id/Button" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button> <EditText android:text="" android:id="@+id/EditText01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:inputType="none" ></ EditText> <com.my.CustomView android:id="@+id/customView" android:layout_width="fill_parent" android:layout_height="fill_parent" > </com.my.CustomView > </LinearLayout> ----------------------------------------------------------------------------------------- when button is clicked, click event set some text to EditText01. then onDraw method of CustomView is called. I think that onDraw method can be called ,as setText method can chang size of EditText01 and CustomView can be moved. but When I click button and EditText01 size do not chang, onDraw method is called. besides, onDraw method do not redraw Canvas in NDK. some logic in NDK work correctly. I want to all or nothing.(some logic and redrawing Canvas work or anything do not work) I think that onDraw must not be called, when position is not changed. Unfortunately onDraw is called. How can I protect onDraw is called? How can I get if CustomView posion be changed or not? if I know that postion is not changed in onDraw of CustomView, I will protect some logic in NDK. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en