mirror of
				https://github.com/SimpleMobileTools/Simple-Launcher.git
				synced 2025-06-05 21:59:15 +02:00 
			
		
		
		
	adjusting some touch calculation
This commit is contained in:
		| @@ -141,7 +141,7 @@ class MainActivity : SimpleActivity(), FlingListener { | |||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 if (mLongPressedIcon != null) { |                 if (mLongPressedIcon != null) { | ||||||
|                     home_screen_grid.draggedItemMoved(event.x.toInt(), event.y.toInt()) |                     home_screen_grid.draggedItemMoved(getGridTouchedX(event.x), getGridTouchedY(event.y)) | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 if (mTouchDownY != -1 && !mIgnoreMoveEvents) { |                 if (mTouchDownY != -1 && !mIgnoreMoveEvents) { | ||||||
|   | |||||||
| @@ -226,7 +226,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Vie | |||||||
|  |  | ||||||
|             // show the app icon itself at dragging |             // show the app icon itself at dragging | ||||||
|             val drawableX = draggedItemCurrentCoords.first - iconSize |             val drawableX = draggedItemCurrentCoords.first - iconSize | ||||||
|             val drawableY = draggedItemCurrentCoords.second - (iconSize * 1.5f).toInt() |             val drawableY = draggedItemCurrentCoords.second - iconSize | ||||||
|             draggedItem!!.drawable!!.setBounds(drawableX, drawableY, drawableX + iconSize, drawableY + iconSize) |             draggedItem!!.drawable!!.setBounds(drawableX, drawableY, drawableX + iconSize, drawableY + iconSize) | ||||||
|             draggedItem!!.drawable!!.draw(canvas) |             draggedItem!!.drawable!!.draw(canvas) | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user