Skip to content
Advertisement

Tag: android-studio

The code is constantly crashing (android studio, java language)

Errors: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.myapplication, PID: 8501 android.content.res.Resources$NotFoundException: Resource ID #0x7f070058 at android.content.res.Resources.getValue(Resources.java:1266) at androidx.appcompat.widget.ResourceManagerInternal.loadDrawableFromDelegates(ResourceManagerInternal.java:255) at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:142) at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:135) at androidx.appcompat.content.res.AppCompatResources.getDrawable(AppCompatResources.java:104) at androidx.appcompat.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:505) at androidx.appcompat.view.menu.ListMenuItemView.initialize(ListMenuItemView.java:131) at androidx.appcompat.view.menu.MenuAdapter.getView(MenuAdapter.java:109) at androidx.appcompat.view.menu.MenuPopup.measureIndividualMenuWidth(MenuPopup.java:161) at androidx.appcompat.view.menu.StandardMenuPopup.tryShow(StandardMenuPopup.java:174) at androidx.appcompat.view.menu.StandardMenuPopup.show(StandardMenuPopup.java:208) at androidx.appcompat.view.menu.MenuPopupHelper.showPopup(MenuPopupHelper.java:296) at androidx.appcompat.view.menu.MenuPopupHelper.tryShow(MenuPopupHelper.java:182) at androidx.appcompat.widget.ActionMenuPresenter$OpenOverflowRunnable.run(ActionMenuPresenter.java:792) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) FirstScreenActivity: SecondScreenActivity:

How to center simple_spinner_dropdown_item in Android Studio?

I want to center the text of my simple_spinner_dropdown_item element, so I got this solution: However, this is just working for the simple_spinner_item where all the dropdown items are way to tight. But when ever I replace it by simple_spinner_dropdown_item the centering is no longer working. I guess the answer lies in this line, but I dont know how to

Getting UNIQUE constraint failed: tbl_data.id (Sqlite code 1555 SQLITE_CONSTRAINT_PRIMARYKEY) error in android studio room

I’m getting this error while i have initialize the id as primary key and i added the unique attribute. Data class code : Data Base Class code : and main activity code : and full error in logat : 2021-11-07 12:20:45.070 24994-24994/com.mohajer.kitset2 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.mohajer.kitset2, PID: 24994 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mohajer.kitset2/com.mohajer.kitset2.MainActivity}: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed:

How to display already checked checkboxes in recyclerview, on activity start-up(many to many relationship)

Each “Note” is differently “added” to “Folders” or should I say, different checked “Folders” for each “Note”. When I check the “Folder”, go back to previous Notes activity with back button, then open the same “Note” to go to “Add to Folders Activity” and add the “Note” to Folders, it should remember that previously checked “Folder” and recheck it. I

Advertisement