摘要:
方法一:写一个内部类,在类中实现点击事件 1、在父类中调用点击事件 2、创建内部类 方法二:使用匿名内部类 方法三:让activity实现点击接口 1、实现点击接口 implements OnClickListener 2、调用点击事件方法 3、实现接口方法 方法四、在layout XML文件中定义 阅读全文
摘要:
xml: 1 <activity android:name=".MainActivity" 2 android:windowSoftInputMode="stateHidden|adjustResize" 3 android:screenOrientation="portrait"> Java: 1 阅读全文
摘要:
xml文件: 1 <TextView 2 android:id="@+id/viewLocation" 3 android:layout_width="match_parent" 4 android:layout_height="120dp" 5 android:hint="now location 阅读全文