您好,我想拖动按钮/文本视图或任何控件到内部线性布局/相对布局。如果我在布局中移动控件,控件就不能从布局中移出。它只在布局内移动吗?
请建议我有用的链接或示例代码。
发布于 2012-01-02 13:34:18
你应该使用一些监听器来满足你的需求,就像这样-
public interface DropListener {
/**
* Called when an item is to be dropped.
* @param from - index item started at.
* @param to - index to place item at.
*/
void onDrop(int from, int to);
}
我已经回答了一个问题here。这可能会对你有所帮助。
https://stackoverflow.com/questions/8700789
复制