以上是scrollview的圖例,可見srollview是一種滑動功能的控件,亦是非常常見的控件. 一般寫法如下: package com.mycompany.viewscroller; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.VelocityTrac…
package com.example.android.db01; import android.app.Activity; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteO…
package com.mycompany.hungry; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.view.Window…
package com.example.ele_me.util; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import android.app.Activity; /** * Very lightweight form of injection, inspired by RoboGuice, for injecting common ui elements. * <p> * Usage is…
src/geniuz/myPathbutton/composerLayout.java package geniuz.myPathbutton; import com.nineoldandroids.animation.Animator; import com.nineoldandroids.animation.Animator.AnimatorListener; import com.nineoldandroids.view.ViewPropertyAnimator; import andro…
src/geniuz/myPathbutton/myAnimations.java package geniuz.myPathbutton; import java.util.ArrayList; import java.util.List; import com.nineoldandroids.animation.Animator; import com.nineoldandroids.animation.Animator.AnimatorListener; import com.nineol…
package com.example.ele_me.activity; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.view…
設置向下拉動更新. package com.mycompany.Scroll_test; import android.app.*; import android.os.*; import android.view.*; import android.widget.*; /** * 刷新控制view * * @author Nono * */ public class RefreshableView extends LinearLayout { private static final Stri…
在scrollView中加插ListView是一個大難題.其中一個難題是Listview的高度難以計算,輸出效果往往強差人意,就讓我們看看當中的問題 . <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_pa…
package com.example.ele_me.activity; import android.annotation.SuppressLint; import android.app.Activity; import android.os.Bundle; import android.support.v4.widget.SlidingPaneLayout; import android.view.View; import android.view.Window; import andro…