Resolving Holoeverywhere 1.4 Migration Errors

Due to some errors, I upgraded the Holoeverywhere library to 1.4 and ActionbarSherlock to 4.4. I (hopefully) resolved the support jar mismatch error, and ASB and HoloEverywhere compile under Android 4.2. ABS is the HoloEverywhere library, and HoloEverywhere is the library of my application.

After changing the source according to the Migration Document (for example, using org.holoeverywhere.activity instead of SActivity), some errors still remain and I would like to know if the implementation has changed, or am I skipping the import or something else.

Some errors:

import org.holoeverywhere.app.Dialog; import org.holoeverywhere.app.ListActivity; import org.holoeverywhere.widget.AdapterView; import org.holoeverywhere.widget.AdapterView.OnItemLongClickListener; import org.holoeverywhere.widget.ListView; import com.actionbarsherlock.view.Menu; import com.actionbarsherlock.view.MenuItem; // Cannot override the final method from _HoloActivity @Override public boolean onContextItemSelected(android.view.MenuItem item) { } public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { menu.setHeaderTitle(R.string.context_menu_dialog_title); menu.add(0, CONTEXT_MENU_DELETE, 13, R.string.context_menu_delete); } // The method getSupportActionBar() is undefined ... getSupportActionBar().setDisplayHomeAsUpEnabled(true); ... // The method onCreateOptionsMenu(Menu) of type MyActivity must override or implement a supertype method @Override public boolean onCreateOptionsMenu(Menu menu) { getSupportMenuInflater().inflate(R.menu.menu_save_cancel, menu); return super.onCreateOptionsMenu(menu); } 

Thanks!

EDIT: This fixed most of the onContextItem errors.

What about

 @Override public boolean onOptionsItemSelected(MenuItem item) { } 

and

 public boolean onCreateOptionsMenu(Menu menu) { } 
+4
source share

Source: https://habr.com/ru/post/1498142/


All Articles