Update views in one Activity from another

前端 未结 3 1548
渐次进展
渐次进展 2021-01-26 17:31

I am trying to emulate a software keyboard using an Activity with Theme.Dialog. The keyboard activity covers only part of the screen. The underlying activity is still active a

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-26 18:29

    I'm answering my own question because the person who supplied the original answer deleted it, and has not reposted it.

    The best solution I've found so far it to create a static field in the software keyboard activity which refers to the EditText being manipulated. The calling Activity then updates this static field before launching the intent.

    This works seamlessly, and I've had no problems with the calling Activity getting blasted off the stack.

提交回复
热议问题