Android: Adding static header to the top of a ListActivity

findViewById() only works to find subviews of the object View. It will not work on a layout id. You’ll have to use layout inflater to convert the xml to it’s corresponding View components. Something like this: ListView lv = getListView(); LayoutInflater inflater = getLayoutInflater(); View header = inflater.inflate(R.layout.header, lv, false); lv.addHeaderView(header, null, false); I’m not … Read more

Android Swipe on List

I had the same problem and I didn’t find my answer here. I wanted to detect a swipe action in ListView item and mark it as swiped, while continue to support OnItemClick and OnItemLongClick. Here is me solution: 1st The SwipeDetector class: import android.util.Log; import android.view.MotionEvent; import android.view.View; public class SwipeDetector implements View.OnTouchListener { public … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)