Dear all, I am trying to set the position of a TextView within an appwidget.
Basically, the direct access to properties af the TextView works:
myRemoteView.setTextColor(R.id.myTextView, Color.WHITE); //works
Also indirectly, I can access the TextView properties:
myRemoteView.setInt(R.id.myTextView, "setTextColor", Color.BLUE); // works
And setting float values also works:
myRemoteView.setFloat(R.id.myTextView, "setTextSize", 25); // works
Now I'm trying to shift the x position of the TextView by 5 pixels:
myRemoteView.setFloat(R.id.myTextView, "setTranslationX", 5); // does not work
myRemoteView.setFloat(R.id.myTextView, "setX", 5); // does not work
myRemoteView.setInt(R.id.myTextView, "setLeft", 5); // does not work
I tried FrameLayout and RelativeLayout, and also AbsoluteLayout (depreciated). Nothing works. But there must be a way to do that. Can you please help?