Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to hide search from menu android studio from activity

// put below code in oncreatOptionMenu(); 
// the use  flag as global variable in your class 
// change its value as you need the call the function invalidateOptionsMenu()
// this function is call the oncreateOptionMenu()
MenuItem item = menu.findItem(R.id.menu_Done);

if (flag/condition)) {
  item.setVisible(false); // its a simple example
} else { 
   item.setVisible(true); 
}
Comment

PREVIOUS NEXT
Code Example
Java :: Android number format thousands separator 
Java :: Uri.builder in android studio 
Java :: zoom sdk not initialized 
Java :: What is the use of @Listener annotation in TestNG? 
Java :: Exercise. Create a simple Java program using array named SumOfArray.java that will accept an input of whole numbers or floating point numbers and will return the Sum result. The program must accept at least 5 numbers. 
Java :: Java create an object of the non-static class Reptile 
Java :: null check in line java 
Java :: SPOJ Prime1 
Java :: the crystallization in time is the phenomenon that we call synchronization 
Java :: sha1 
Java :: Algorithms - filtering 
Java :: create object of hashMap with integer key and String value 
Java :: mysqld always running 
Java :: spring boot thymeleaf bindingresult 
Java :: find maximum number of rides in amusement park python 
Java :: java exe ausführen 
Java :: charstreams cannot be resolved 
Java :: how to enforce xml dtd validation in java 
Java :: java datasource 
Java :: okhttp Synchronous Network Calls 
Java :: java.lang.IllegalStateException: Not scheduled yet 
Java :: how to get single value from input string in java 
Java :: how to count an replace string in java 
Java :: run app by package android 
Java :: java scan next into array 
Java :: Arraylist imp for recursion 
Java :: IMEI DEVISE ANDROID JAVA 
Java :: subtract two variables in java 
Java :: java find view by id 
Java :: sudoku generator java code 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =