Reputation: 445
I am beginner in android. I am creating a Custom Dialog box, it is working fine. But this dialog box does not moved. How to move this custom dialog box. For example in windows contains Notepad, Paint, etc. When you click this (Notepad, Paint, etc) title bar you can move the position. If it is possible please send information how to move dialog box. Otherwise if it is not possible send Reason. Please reply your answers and comments are valuable me. Thanks.
Upvotes: 4
Views: 2434
Reputation: 18592
Dialog doesn't have any Touch event listeners so you might possibly create an Activity, implement onTouchListener on it, and in manifest file
<activity android:theme="@android:style/Theme.Dialog">
Now your Activity will look like a DialogBox, and you can implement the view's setOnTouchListener()
and write the required code in that listener.
Upvotes: 5