java - Android - Issue With Displaying Fragments -


I just can not find the pieces to display ...! And I know that this is a problem within my onCreateView . Does anyone possibly look at this issue and think about some sort of solution ??

If I exclude line 34-59, then the first piece is actually displayed, which is super.onCreate (savedInstanceState); with onCreateView , and concludes with }); confirmButton.setOnClickListener for . However, the comments were made with those lines, the tab for the second piece, when clicked, the app leads to crashing. I can not even save the information that I want to get from the first piece by doing so ... so I need those lines

I sincerely appreciate all and any help, your Thank you very much for the time!

  public class Lyric Adittr Fregment expansion (private editing text mTitleText; private editing text mBodyText; private Long Maraiaidi; personal songs DbAdapter mDbHelper; @ Override public Dekenkretiwu (Leautifltr Infletr, View Group container, Bundle saved Instensstet) {// Tudo Auto-generated method stub views = inflater.inflate (R.layout.activity_lyriceditor, container, false); super.onCreate (savedInstanceState); MDbHelper = new song DbAdapter (getActivity ()); MDbHelper.open (); MTitleText = ( Npadn text) getView (). FindViewById (R.id.title); MBodyText = (editable text) getView (). FindViewById (R.id.body); button Pustibtn = (Button) getView (). FindViewById (R. id.confirm); MRowId = (saved Instensstet == null)? null: (long) saved Instensstet. gate Sirialejhebl (LyricsDbAdapter.KEY_ROWID); if (mRowId == nULL) {Bundle extras = Milaktiviti (). GetIntent ( ). GetExtras (); MRowId = Extra! = Tap? Extras.getLong (LyricsDbAdapter.KEY_ROWID): Blank;} PopulateFields (); ConfirmButton.setOnClickListener (new View.OnClickListener () {public void onClick (View view) {getActivity (). SetResult (Activity.RESULT_OK); getActivity (). Finish ();}}); Return view; } Private Zero populateFields () {If (mRowId! = Tap) {cursor song = mDbHelper.fetchLyric (mRowId); . GetActivity () startManagingCursor (song); MTitleText.setText (song. Get string (song.GailindExTrat (LyricsDbAdapter.KEY_TITLE))); MBodyText.setText (lyric.getString (lyric.getColumnIndexOrThrow (LyricsDbAdapter.KEY_BODY))); }} @overवर्ल्ड पब्लिक व्हाट ऑन सवेंस्टेन्सस्टेट (बंडल आउटस्टेट) {super. On Sustainstast (Oststate); Save the State (); OutState.putSerializable (LyricsDbAdapter.KEY_ROWID, mRowId); } @ Override public wide on pause () (super. State Save ();} @ Override public Ricoid on Risum () {super. Punrsum (); PopulateFields ();} private void Save () {String title = mTitleText.getText (). ToString (); String body = mBodyText.getText (). ToString (); if (mRowId == tap) {long id = mDbHelper.createLyric (title, body); if (id> gt; 0) {MRowId = id;}} and {mDbHelper.updateLyric (mRowId, title, body);}}}   

Here's a picture of my lockback:

< Img src = "https://i.stack.imgur.com/EWYZT.png" alt = "logcat">

getView () function The use of the system will be empty as your piece, so far its view is not set (this is what you actually return to seeing) instead you need to use view.findViewById () and search for that scene , Which you simply inflate.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -