polewclear.blogg.se

Android studio spinner in dialogfragment
Android studio spinner in dialogfragment










android studio spinner in dialogfragment

I was hoping I could update nameString to mEtName and send it back.

android studio spinner in dialogfragment

In my alert dialog fragment, I find the edittext like this View dialogname = getActivity().getLayoutInflater().inflate(R.agment_home, null) final EditText mEtName = (EditText) dialogname.findViewById(R.id.homeName) Īnd summon my argument as such: Bundle b = getArguments() final String nameString = b.getString("homeName") HomeNameFragment newFragment = new homeNameFragment() newFragment.show(getFragmentManager(), "homeName") tArguments(b) Here is my main code Bundle b = new Bundle() Right now I'm trying to use bundles for this. I want to have it then send the value back to the main activity and change the textview's contents. Right now I have under settings an option to change the name in an alert dialog, typing it into an edittext. I'm working on an app to keep score at a softball game, and I have the team name ("Home") in a textview. I've been working on this for about two weeks and I'm not sure it can be done.












Android studio spinner in dialogfragment