Tag Archives: menu

734 views

App have transparent menu Android

If the app have transparent menu and you do not want this, try delete @style/AppTheme in application tag in AndroidManifest.xml and try run module – project. If menu is not transparent , maybe it caused <application android:allowBackup="true" android:icon="@drawable/dicts_ico" android:label="@string/app_name" android:theme="@style/AppTheme" … Continue reading

Posted in Android Examples Code, Android Studio, Bugs, warnings, errors | Tagged | Comments Off on App have transparent menu Android
1,092 views

Android widget SearchView in onCreateOptionsMenu is null

If your class extends AppCompatActivity public class SearchableActivity extends AppCompatActivity Check if linked appropriate library for: import android.support.v4.view.MenuItemCompat; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; Check if you have to properly sett SearchView in menu xml for onCreateOptionsMenu menu_main.xml <menu xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” … Continue reading

Posted in Android Studio, Bugs, warnings, errors | Tagged , | Comments Off on Android widget SearchView in onCreateOptionsMenu is null
4,903 views

Android 4.4 Emulator does not rotate screen

Some bug in Android 4.4 Emulator If I press Ctrl + F11 applications screen does not rotate. You can change Screen Orientation programatically for example by menu item private static final int MY_MENU_6 = Menu.FIRST + 5; private static final … Continue reading

Posted in Bugs, warnings, errors, Eclipse | Tagged , , , , | Comments Off on Android 4.4 Emulator does not rotate screen
7,372 views

Create the Menu MenuItem dynamically Android example

public class MyActivity extends Activity { // http://www.apache.org/licenses/LICENSE-2.0   @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new SampleView(this)); } // set ID private static final int MY_MENU_1 = Menu.FIRST; private static final int MY_MENU_2 = Menu.FIRST + 1; private static … Continue reading

Posted in Android Examples Code | Tagged , , | Comments Off on Create the Menu MenuItem dynamically Android example