I have a Fragment
within my Activity
which is created dynamically from an almost blank layout.xml, which only holds a LinearLayout
and a RelativeLayout
. Their contents are created at runtime on the user's behalf.
I'd like to synchronize my app widget's layout with the Fragment
's, so the app widget will look the same after every change within the Fragment
. Those changes are being saved in SharedPreferences
, so the Fragment
will look the same on next initialization. The reason why I'm using the Fragment
is because I want to be able to respond on actions like onLongClick()
.
So I'm looking for a way to update my app widget's layout with the recently added Views
(e.g. a Button
).