Muennighoff/xP3x-sample huggingface dataset:
inputs: Given the following code:
// Hide status bar
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
// Show status bar
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
Describe it:
targets: Android: show/hide status bar/power bar
inputs: Given the following code:
public class myWebViewClient extends WebViewClient {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }
}
Describe it:
targets: android webview stay in app
inputs: Description:
Android M Light and Dark status bar programmatically - how to make it dark again?

Implementation:
targets: public static void clearLightStatusBar(@NonNull View view) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        int flags = view.getSystemUiVisibility();
        flags &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
        view.setSystemUiVisibility(flags);
    }
}
inputs: Given the following code:
mspUserState.setOnTouchListener(new OnTouchListener() {

    @Override
    public boolean onTouch(View v, MotionEvent event) {
        if (event.getAction() == MotionEvent.ACTION_UP) {
            doWhatIsRequired();
        }
        return false;
    }
});
Describe it:
targets: Setting a spinner onClickListener() in Android
inputs: Description:
Prevent ViewPager from destroying off-screen views

Implementation:
targets: mViewPager = (ViewPager)findViewById(R.id.pager);
mViewPager.setOffscreenPageLimit(2);
inputs: Given the following code:
alertDialog.getWindow().setSoftInputMode(
    WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
Describe it:
targets: How to resize AlertDialog on the Keyboard display
inputs: Description:
How to get a list of installed android applications and pick one to run

Implementation:
targets: Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0);
inputs: Description:
Wifi Connect-Disconnect Listener

Implementation:
targets: public class WifiReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {     
        ConnectivityManager conMan = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); 
        NetworkInfo netInfo = conMan.getActiveNetworkInfo();
        if (netInfo != null && netInfo.getType() == ConnectivityManager.TYPE_WIFI) 
            Log.d("WifiReceiver", "Have Wifi Connection");
        else
            Log.d("WifiReceiver", "Don't have Wifi Connection");    
    }   
};
inputs: Given the following code:
Blurry.with(context)
  .radius(10)
  .sampling(8)
  .color(Color.argb(66, 255, 255, 0))
  .async()
  .onto(rootView);
Describe it:
targets: How to blur background images in Android
inputs: Given the following code:
mWebView.setOnTouchListener(new View.OnTouchListener() {
    @Override
    public boolean onTouch(View v, MotionEvent event) {
        return true;
    }
});
Describe it:
targets: Disable WebView touch events in Android
inputs: Given the following code:
Intent closeIntent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
context.sendBroadcast(closeIntent);
Describe it:
targets: How can I programmatically open/close notifications in Android?
inputs: Description:
Android dismiss keyboard

Implementation:
targets: InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
inputs: Given the following code:
RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radiogroup);
radioGroup.clearCheck();
Describe it:
targets: Uncheck all RadioButton in a RadioButtonGroup
inputs: Given the following code:
textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 
           getResources().getDimension(R.dimen.result_font));
Describe it:
targets: Setting textSize programmatically
inputs: Description:
Android - Share on Facebook, Twitter, Mail, ecc

Implementation:
targets: String message = "Text I want to share.";
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("text/plain");
share.putExtra(Intent.EXTRA_TEXT, message);

startActivity(Intent.createChooser(share, "Title of the dialog the system will open"));
inputs: Given the following code:
android.util.Patterns.EMAIL_ADDRESS.matcher(input).matches();
android.util.Patterns.PHONE.matcher(input).matches();
Describe it:
targets: Email and phone Number Validation in android
inputs: Description:
How to get screen resolution of an android device using LIBGDX?

Implementation:
targets: Gdx.graphics.getWidth();
Gdx.graphics.getHeight();
inputs: Description:
Is there any way to receive a notification when the user powers off the device?

Implementation:
targets: public class ShutdownReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        //Insert code here
    }

}
inputs: Description:
How to call getWindow() outside an Activity in Android?

Implementation:
targets: void someMethodThatUsesActivity(Activity myActivityReference) {
    myActivityReference.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
inputs: Given the following code:
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
        .requestIdToken(getString(R.string.default_web_client_id))
        .requestEmail()
        .build();
Describe it:
targets: Google Sign-In requestIdToken returns null
inputs: Given the following code:
Retrofit retrofit = new Retrofit.Builder()
    .baseUrl(endpoint)
    .addConverterFactory(GsonConverterFactory.create())
    .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
    .build();
Describe it:
targets: IllegalArgumentException: Could not locate call adapter for rx.Observable RxJava, Retrofit2
inputs: Given the following code:
yourEditText.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
    if (hasFocus) {
      //got focus
    } else {
      //lost focus
    }
  }
});
Describe it:
targets: SoftKeyboard open and close listener in an activity in Android?
inputs: Given the following code:
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
Describe it:
targets: Make Tabs on ActionBar scroll when reach limit, rather than create a dropdown-list
inputs: Given the following code:
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + "Your Phone_number"));
startActivity(intent);
Describe it:
targets: How to make a phone call using intent in Android?
inputs: Given the following code:
public void minimizeApp() {
    Intent startMain = new Intent(Intent.ACTION_MAIN);
    startMain.addCategory(Intent.CATEGORY_HOME);
    startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(startMain);
}
Describe it:
targets: I need to minimize the android application on back button click
inputs: Description:
When I run Thread second time: java.lang.IllegalThreadStateException: Thread already started

Implementation:
targets: if (thread.getState() == Thread.State.NEW)
{
     thread.start();
}
inputs: Given the following code:
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
    StrictMode.setThreadPolicy(policy);
Describe it:
targets: Quick fix for NetworkOnMainThreadException
inputs: Given the following code:
scrollViewEventDetails.fullScroll(View.FOCUS_UP);//if you move at the end of the scroll

scrollViewEventDetails.pageScroll(View.FOCUS_UP);//if you move at the middle of the scroll
Describe it:
targets: Android: How to scroll ScrollView in top
inputs: Description:
IllegalArgumentException: Could not locate call adapter for rx.Observable RxJava, Retrofit2

Implementation:
targets: Retrofit retrofit = new Retrofit.Builder()
    .baseUrl(endpoint)
    .addConverterFactory(GsonConverterFactory.create())
    .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
    .build();
inputs: Description:
Sending an Intent to browser to open specific URL

Implementation:
targets: String url = "http://www.example.com";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
inputs: Given the following code:
startForeground(0, notification); // Doesn't work...

startForeground(1, notification); // Works!!!
Describe it:
targets: startForeground() does not show my Notification
inputs: Given the following code:
private Activity getActivity() {
    Context context = getContext();
    while (context instanceof ContextWrapper) {
        if (context instanceof Activity) {
            return (Activity)context;
        }
        context = ((ContextWrapper)context).getBaseContext();
    }
    return null;
}
Describe it:
targets: Android get hosting Activity from a view
inputs: Given the following code:
Retrofit retrofit = new Retrofit.Builder()
            .baseUrl(Constants.API_BASE_URL)
            .addConverterFactory(GsonConverterFactory.create())
            .build();
Describe it:
targets: (Retrofit) Could not locate converter for class crashing app
inputs: Description:
Android Spinner using ArrayList<String>

Implementation:
targets: ArrayAdapter<String> karant_adapter = new ArrayAdapter<String>(this,
     android.R.layout.simple_spinner_item, return_likes);
inputs: Description:
webview showing white bar on right side

Implementation:
targets: //webview being your WebView object reference.
webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
inputs: Description:
Canvas: trying to use a recycled bitmap android.graphics.Bitmap in android

Implementation:
targets: if (mBitmap != null && !mBitmap.isRecycled()) {
    mBitmap.recycle();
    mBitmap = null; 
}
inputs: Given the following code:
Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setData(Uri.parse("market://search?q=pname:MyApp")); 
startActivity(intent);
Describe it:
targets: Start Android Market from App
inputs: Description:
How can I start the Accessibility Settings Page of my APP in Android?

Implementation:
targets: Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivity(intent);
inputs: Given the following code:
Intent i = new
Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(i);
Describe it:
targets: How to turn on the GPS on Android
inputs: Given the following code:
try {
   startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://user?screen_name=" + twitter_user_name)));
}catch (Exception e) {
   startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/#!/" + twitter_user_name)));
}
Describe it:
targets: Open Twitter application user profile from Android application
inputs: Description:
How to set multiple parent activities for using android back button

Implementation:
targets: switch (item.getItemId()) {
    case android.R.id.home:
        finish();
        return true;
    default:        
         return super.onOptionsItemSelected(item);
}
inputs: Given the following code:
@Override
 public void onDestroyView() {
     if (getDialog() != null && getRetainInstance()) {
         getDialog().setDismissMessage(null);
     }
     super.onDestroyView();
 }
Describe it:
targets: Android DialogFragment disappears after orientation change
inputs: Given the following code:
Intent intent = new Intent(Intent.ACTION_INSERT, 
                               ContactsContract.Contacts.CONTENT_URI);
    startActivity(intent);
Describe it:
targets: How can I launch the 'Add Contact' activity in android
inputs: Description:
Unable to create converter for my class in Android Retrofit library

Implementation:
targets: Retrofit retrofit = new Retrofit.Builder()
    .baseUrl("**sample base url here**")
    .addConverterFactory(GsonConverterFactory.create())
    .build();
inputs: Description:
Android, how to choose save file location?

Implementation:
targets: String extStorage = Environment.getExternalStorageState();
path = extStorage+"/Android/data/com.mydomain.myapp/";
inputs: Description:
Destroy Pages on ViewPager and FragmentStatePagerAdapter

Implementation:
targets: @Override
public int getItemPosition(Object object) {
    return POSITION_NONE;
}
inputs: Description:
Denied starting an intent without a user gesture Webview Android

Implementation:
targets: webView.setWebViewClient(new WebViewClient() {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        return false;                
    }
});
inputs: Description:
Android: Special url to open Marketplace to a specific app?

Implementation:
targets: Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.example.android"));
startActivity(intent);
inputs: Given the following code:
//Disable Map Toolbar:
mMap.getUiSettings().setMapToolbarEnabled(false);
Describe it:
targets: How to hide "Navigation" and "GPS Pointer" buttons when I click the marker on the android google map
inputs: Description:
android - setting LayoutParams programmatically

Implementation:
targets: tv.setLayoutParams(new ViewGroup.LayoutParams(
    ViewGroup.LayoutParams.WRAP_CONTENT,
    ViewGroup.LayoutParams.WRAP_CONTENT));
inputs: Description:
creating a menu after a long click event on a list view

Implementation:
targets: view.setOnCreateContextMenuListener(new OnCreateContextMenuListener() {
    @Override
    public void onCreateContextMenu(final ContextMenu menu, final View v,
        final ContextMenuInfo menuInfo) {

    }
});
inputs: Given the following code:
KeyguardManager myKM = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
if( myKM.inKeyguardRestrictedInputMode()) {
 //it is locked
} else {
 //it is not locked
}
Describe it:
targets: How to reveal that screen is locked?
inputs: Given the following code:
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(intent);
Describe it:
targets: Enable GPS programatically Android (without navigating to the location settings)
inputs: Given the following code:
_webView.setWebViewClient(new WebViewClient() {
    public void onPageFinished(WebView view, String url) {
        _webView.loadUrl(
            "javascript:document.body.style.setProperty(\"color\", \"white\");"
        );
    }
});
Describe it:
targets: Changing text color in a WebView?
inputs: Description:
Check if color is dark or light in Android

Implementation:
targets: public boolean isColorDark(int color){
    double darkness = 1-(0.299*Color.red(color) + 0.587*Color.green(color) + 0.114*Color.blue(color))/255;
    if(darkness<0.5){
        return false; // It's a light color
    }else{
        return true; // It's a dark color
    }
}
inputs: Description:
Move cursor to end of EditText?

Implementation:
targets: String newtext = editText.getText().toString() + "the new text";
editText.setText("");
editText.append(newtext);
inputs: Given the following code:
Retrofit retrofit = new Retrofit.Builder()
    .baseUrl(SERVICE_ENDPOINT)
    .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
    .build();
Describe it:
targets: Unable to create call adapter for io.reactivex.Observable
inputs: Description:
The onClick() of ClickableSpan is not working for URLSpan?

Implementation:
targets: // The original URLSpan needs to be removed to block the behavior of browser opening
    strBuilder.removeSpan(span);
inputs: Description:
Android: show/hide status bar/power bar

Implementation:
targets: // Hide status bar
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
// Show status bar
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
inputs: Given the following code:
int xPos = (canvas.getWidth() / 2);
 int yPos = (int) ((canvas.getHeight() / 2) - ((textPaint.descent() + textPaint.ascent()) / 2)) ; 
 //((textPaint.descent() + textPaint.ascent()) / 2) is the distance from the baseline to the center.

 canvas.drawText("Hello", xPos, yPos, textPaint);
Describe it:
targets: Android Center text on canvas
inputs: Description:
Android Toast Message is not showing

Implementation:
targets: Toast.makeText(getBaseContext(), "Amount can not be grater than invoice",
                                                     Toast.LENGTH_SHORT).show();
inputs: Description:
Google Sign-In requestIdToken returns null

Implementation:
targets: GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
        .requestIdToken(getString(R.string.default_web_client_id))
        .requestEmail()
        .build();
inputs: Description:
Check whether headphones are plugged in

Implementation:
targets: AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
audioManager.isWiredHeadsetOn();
inputs: Given the following code:
map.setOnMarkerClickListener(new OnMarkerClickListener() {
        @Override
        public boolean onMarkerClick(Marker marker) {
            return true;
        }
    });
Describe it:
targets: How to disable marker click event?
inputs: Description:
Android - prevent TalkBack from announcing TextView title aloud

Implementation:
targets: ViewCompat.setImportantForAccessibility(
        decorativeTextView,
        ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO);
inputs: Given the following code:
Intent intent = new Intent(Intent.ACTION_MAIN);
    intent.addCategory(Intent.CATEGORY_HOME);
    startActivity(intent);
Describe it:
targets: How to return to home screen from Activity
inputs: Description:
Check if RecyclerView is scrollable

Implementation:
targets: public boolean isRecyclerScrollable(RecyclerView recyclerView) {
    return recyclerView.computeHorizontalScrollRange() > recyclerView.getWidth() || recyclerView.computeVerticalScrollRange() > recyclerView.getHeight();
}
inputs: Description:
Clicking URLs opens default browser

Implementation:
targets: private class HelloWebViewClient extends WebViewClient {
  @Override
  public boolean shouldOverrideUrlLoading(WebView view, String url) {
    view.loadUrl(url);
    return true;
  }
}
inputs: Given the following code:
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);  
setProgressBarIndeterminateVisibility(true); 
Describe it:
targets: Using ProgressDialog in ActionBar (Android)
inputs: Description:
How can I programmatically open/close notifications in Android?

Implementation:
targets: Intent closeIntent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
context.sendBroadcast(closeIntent);
inputs: Description:
Make Tabs on ActionBar scroll when reach limit, rather than create a dropdown-list

Implementation:
targets: actionBar.setDisplayShowTitleEnabled(false);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
inputs: Given the following code:
String enabledListeners = Settings.Secure.getString(context.getContentResolver(), 
    "enabled_notification_listeners");
Describe it:
targets: Is there a way an app can check if it is allowed to access notifications?
inputs: Description:
How to remove auto focus/keyboard popup of a field when the screen shows up?

Implementation:
targets: InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(editTextField.getWindowToken(), 0);
inputs: Description:
How can I check if GPS is enabled before I try to use it

Implementation:
targets: if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){
        //Do what you need if enabled...
    }else{
        //Do what you need if not enabled...
    }
inputs: Description:
Enable GPS programatically Android (without navigating to the location settings)

Implementation:
targets: Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(intent);
inputs: Given the following code:
getActivity().finish();
System.exit(0);
Describe it:
targets: Close android application programmatically
inputs: Given the following code:
seekBar.setOnTouchListener(new OnTouchListener(){
        @Override
        public boolean onTouch(View v, MotionEvent event) {
            return true;
        }
    });
Describe it:
targets: android disable seek bar for audio controller
inputs: Given the following code:
webView.loadUrl("javascript:(function(){"+
    "l=document.getElementById('mA');"+
    "e=document.createEvent('HTMLEvents');"+
    "e.initEvent('click',true,true);"+
    "l.dispatchEvent(e);"+
    "})()");
Describe it:
targets: programmatic click in Android WebView
inputs: Given the following code:
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivity(intent);
Describe it:
targets: How can I start the Accessibility Settings Page of my APP in Android?
inputs: Given the following code:
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
Describe it:
targets: Going to home screen programmatically
inputs: Given the following code:
String myVersion = android.os.Build.VERSION.RELEASE; // e.g. myVersion := "1.6"
int sdkVersion = android.os.Build.VERSION.SDK_INT; // e.g. sdkVersion := 8;
Describe it:
targets: Getting device os version in Android programmatically
inputs: Description:
How to clear focus and remove keyboard on Android?

Implementation:
targets: InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(editTextField.getWindowToken(), 0);
inputs: Given the following code:
public static boolean isRoboUnitTest() {
    return "robolectric".equals(Build.FINGERPRINT);
}
Describe it:
targets: How do I know if my app is running with Robolectric?
inputs: Description:
Android: making a fullscreen application

Implementation:
targets: getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
inputs: Given the following code:
myWebView.post(new Runnable() {
    @Override
    public void run() {
        webviewLoadURL("file:///android_asset/test1.html");
    }
});
Describe it:
targets: android webview.loadUrl won't load another webpage
inputs: Given the following code:
File externalStorageDir = Environment.getExternalStorageDirectory();
StatFs statFs = new StatFs(externalStorageDir.getAbsolutePath());  
long blocks = statFs.getAvailableBlocks();
long free = (blocks * statFs.getBlockSize()) / 1024 / 1024;
Describe it:
targets: How to check availability of space on external storage?
inputs: Given the following code:
int start = Math.max(myEditText.getSelectionStart(), 0);
int end = Math.max(myEditText.getSelectionEnd(), 0);
myEditText.getText().replace(Math.min(start, end), Math.max(start, end),
        textToInsert, 0, textToInsert.length());
Describe it:
targets: Android: Insert text into EditText at current position
inputs: Description:
how to create random UUID in Android when button click event happens?

Implementation:
targets: if(uniqueId == null) { 
uniqueId = UUID.randomUUID().toString(); 
}
inputs: Given the following code:
Intent intent = new Intent(context, YourSecondActivity.class);
context.startActivity(intent);
((Activity) context).finish();
Describe it:
targets: Finish activity in dialog class
inputs: Description:
How to handle touch event on google map (MapFragment)?

Implementation:
targets: map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
 @Override
 public void onMapClick(LatLng latLng) {

  //Do what you want on obtained latLng
 }
});
inputs: Description:
How to play ringtone/alarm sound in Android

Implementation:
targets: Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);
r.play();
inputs: Given the following code:
String asciiName = Normalizer.normalize(unicodeName, Normalizer.Form.NFD)
    .replaceAll("[^\\p{ASCII}]", "");
Describe it:
targets: How to ignore accent in SQLite query (Android)
inputs: Description:
How to get elements(findViewById) for a layout which is dynamically loaded(setView) in a dialog?

Implementation:
targets: View view = (View) LayoutInflater.from(ctx).inflate(R.layout.preference_report_bug_layout, null);
EditText editText = view.findViewById(R.id.bug_description_edittext);
builder.setView(view);
inputs: Description:
Link should be open in same web view in Android

Implementation:
targets: myWebView.setWebViewClient(new WebViewClient() {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
        view.loadUrl(request.getUrl().toString());
        return false;
    }
});
inputs: Description:
Disable soft-keyboard from EditText but still allow copy/paste?

Implementation:
targets: getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
    WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
inputs: Given the following code:
ItemAnimator animator = recyclerView.getItemAnimator();
if (animator instanceof SimpleItemAnimator) {
  ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
}
Describe it:
targets: RecyclerView blinking after notifyDatasetChanged()
inputs: Description:
Send email via gmail

Implementation:
targets: Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
            "mailto","abc@gmail.com", null));
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "EXTRA_SUBJECT");
startActivity(Intent.createChooser(emailIntent, "Send email..."));
inputs: Description:
Disable animation of drawer icon in double navigation drawer for right drawer

Implementation:
targets: @Override
  public void onDrawerSlide(View drawerView, float slideOffset) 
  {
        if(drawerView!=null && drawerView == rightDrawerListView){
              super.onDrawerSlide(drawerView, 0);
        }else{
              super.onDrawerSlide(drawerView, slideOffset);
        }
  }
inputs: Given the following code:
view.setOnCreateContextMenuListener(new OnCreateContextMenuListener() {
    @Override
    public void onCreateContextMenu(final ContextMenu menu, final View v,
        final ContextMenuInfo menuInfo) {

    }
});
Describe it:
targets: creating a menu after a long click event on a list view
inputs: Description:
Android get hosting Activity from a view

Implementation:
targets: private Activity getActivity() {
    Context context = getContext();
    while (context instanceof ContextWrapper) {
        if (context instanceof Activity) {
            return (Activity)context;
        }
        context = ((ContextWrapper)context).getBaseContext();
    }
    return null;
}
inputs: Description:
programmatic click in Android WebView

Implementation:
targets: webView.loadUrl("javascript:(function(){"+
    "l=document.getElementById('mA');"+
    "e=document.createEvent('HTMLEvents');"+
    "e.initEvent('click',true,true);"+
    "l.dispatchEvent(e);"+
    "})()");
inputs: Description:
How can i check whether an android device is connected to the web?

Implementation:
targets: NetworkInfo ni = cm.getActiveNetworkInfo();
if (ni == null) {
    // There are no active networks.
    return false;
}
inputs: Given the following code:
String serviceComponent = Settings.Secure.getString(mContext.getContentResolver(),
        "voice_recognition_service");
Describe it:
targets: How to query for the default SpeechRecognizer
inputs: Description:
Opening Android Settings programmatically

Implementation:
targets: startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS), 0);
inputs: Given the following code:
webView.setWebViewClient(new WebViewClient() {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        return false;                
    }
});
Describe it:
targets: Denied starting an intent without a user gesture Webview Android
inputs: Given the following code:
if (SensorManager.getRotationMatrix(m_rotationMatrix, null, m_lastAccels, m_lastMagFields)) {
}
Describe it:
targets: How can I use SensorManager.getOrientation for tilt controls like "My Paper Plane"?
inputs: Description:
Android: setResult not working

Implementation:
targets: getActivity().setResult(Activity.RESULT_OK, intent);
getActivity().finish();
inputs: Given the following code:
GoogleMap map;
map.getUiSettings().setMapToolbarEnabled(false);
Describe it:
targets: Android google maps marker disable navigation option
inputs: Given the following code:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
    task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else {
    task.execute();
}
Describe it:
targets: Second AsyncTask not executing
inputs: Given the following code:
if(popup!=null){
   //dismiss the popup
   popup.dismiss();
   //make popup null again
   popup=null;
}
Describe it:
targets: dismiss the popup window by back button
inputs: Given the following code:
map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
 @Override
 public void onMapClick(LatLng latLng) {

  //Do what you want on obtained latLng
 }
});
Describe it:
targets: How to handle touch event on google map (MapFragment)?
inputs: Description:
Call fragment events from activity

Implementation:
targets: FragmentB fragmentB = (FragmentB)getFragmentManager().findFragmentById(R.id.fragmentBId);
fragmentB.performSomeTask();
inputs: Given the following code:
if (getCallingActivity() == null) {
    //This Activity was called by startActivity 
} else {
   //This Activity was called by startActivityForResult
}
Describe it:
targets: How to know if an activity is called using startActivityForResult or simply called by using startActivity?
inputs: Description:
Actionbar Sherlock: Setting and hiding title bar

Implementation:
targets: setTitle("Title");
getSupportActionBar().hide();
inputs: Description:
Quick fix for NetworkOnMainThreadException

Implementation:
targets: StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
    StrictMode.setThreadPolicy(policy);
inputs: Given the following code:
Settings.Secure.putString(getContentResolver(), 
    Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, "pkgname/classname");
Settings.Secure.putString(getContentResolver(), 
    Settings.Secure.ACCESSIBILITY_ENABLED, "1");
Describe it:
targets: How to Programmatically Enable/Disable Accessibility Service in Android
inputs: Given the following code:
public int getStatusBarHeight() {
    int result = 0;
    int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
    if (resourceId > 0) {
        result = getResources().getDimensionPixelSize(resourceId);
    }
    return result;
}
Describe it:
targets: Height of status bar in Android
inputs: Description:
Android backup/restore: how to backup an internal database?

Implementation:
targets: FileBackupHelper hosts = new FileBackupHelper(this,
    "../databases/" + HostDatabase.DB_NAME);
addHelper(HostDatabase.DB_NAME, hosts);
inputs: Given the following code:
public boolean isLoggedIn() {
    AccessToken accessToken = AccessToken.getCurrentAccessToken();
    return accessToken != null;
}
Describe it:
targets: How to check if user is logged in with FB SDK 4.0 for Android?
inputs: Given the following code:
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
        android.R.layout.simple_list_item_1, android.R.id.text1, values);
Describe it:
targets: ArrayAdapter in android to create simple listview
inputs: Description:
Changing text color in a WebView?

Implementation:
targets: _webView.setWebViewClient(new WebViewClient() {
    public void onPageFinished(WebView view, String url) {
        _webView.loadUrl(
            "javascript:document.body.style.setProperty(\"color\", \"white\");"
        );
    }
});
inputs: Given the following code:
requestWindowFeature(Window.FEATURE_NO_TITLE);// hide statusbar of Android
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
    WindowManager.LayoutParams.FLAG_FULLSCREEN);
Describe it:
targets: Hide status bar android
inputs: Description:
Cannot use getSystemService("usagestats") Android Studio

Implementation:
targets: //noinspection ResourceType
UsageStatsManager usageStatsManager=(UsageStatsManager)context.getSystemService("usagestats");
inputs: Given the following code:
boolean hasMenuKey = ViewConfiguration.get(context).hasPermanentMenuKey();
boolean hasBackKey = KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK);

if(!hasMenuKey && !hasBackKey) {
    // Do whatever you need to do, this device has a navigation bar
}
Describe it:
targets: Check for navigation bar
inputs: Description:
Finish activity in dialog class

Implementation:
targets: Intent intent = new Intent(context, YourSecondActivity.class);
context.startActivity(intent);
((Activity) context).finish();
inputs: Given the following code:
recorder = new MediaRecorder(); 
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
Describe it:
targets: Video recording format(.3gp or mp4) in android?
inputs: Description:
How to hide the soft keyboard from inside a fragment?

Implementation:
targets: getActivity().getWindow().setSoftInputMode(
            WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
inputs: Description:
I need to minimize the android application on back button click

Implementation:
targets: public void minimizeApp() {
    Intent startMain = new Intent(Intent.ACTION_MAIN);
    startMain.addCategory(Intent.CATEGORY_HOME);
    startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(startMain);
}
inputs: Description:
Start Android Market from App

Implementation:
targets: Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setData(Uri.parse("market://search?q=pname:MyApp")); 
startActivity(intent);
inputs: Description:
How to open number dialer pad programmatically in android?

Implementation:
targets: Intent intent = new Intent(Intent.ACTION_DIAL); 
startActivity(intent);
inputs: Description:
AWS DynamoDB Requested resource not found

Implementation:
targets: ddbClient.setRegion(Region.getRegion(Regions.EU_WEST_1));  
// Add correct Region. In my case its EU_WEST_1
inputs: Description:
Height of screen without status bar, actionBar and tabs

Implementation:
targets: int resource = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
    if (resource > 0) {
        statusBarHeight = context.getResources().getDimensionPixelSize(resource);
    }
inputs: Given the following code:
public MenuItem setActionView(int resId) {
    final Context context = mMenu.getContext();
    final LayoutInflater inflater = LayoutInflater.from(context);
    setActionView(inflater.inflate(resId, new LinearLayout(context), false));
    return this;
}
Describe it:
targets: What should I pass for root when inflating a layout to use for a MenuItem's ActionView?
inputs: Given the following code:
scroll.post(new Runnable() {            
    @Override
    public void run() {
           scroll.fullScroll(View.FOCUS_DOWN);              
    }
});
Describe it:
targets: Android: ScrollView force to bottom
inputs: Description:
How do I check HoneyComb or higher is running, and accordingly call a method for that Version?

Implementation:
targets: if (android.os.Build.VERSION.SDK_INT>=android.os.Build.VERSION_CODES.HONEYCOMB) {
  // call something for API Level 11+
}
inputs: Description:
How to open phones gallery through code

Implementation:
targets: Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"),SELECT_IMAGE);
inputs: Description:
Setting a spinner onClickListener() in Android

Implementation:
targets: mspUserState.setOnTouchListener(new OnTouchListener() {

    @Override
    public boolean onTouch(View v, MotionEvent event) {
        if (event.getAction() == MotionEvent.ACTION_UP) {
            doWhatIsRequired();
        }
        return false;
    }
});
inputs: Description:
How to prevent OnItemClickListener work when long click performed?

Implementation:
targets: public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {   
   return true;
}
inputs: Description:
Setting textSize programmatically

Implementation:
targets: textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 
           getResources().getDimension(R.dimen.result_font));
inputs: Description:
How to determine device screen size category (small, normal, large, xlarge) using code?

Implementation:
targets: if ((getResources().getConfiguration().screenLayout & 
  Configuration.SCREENLAYOUT_SIZE_MASK) == 
    Configuration.SCREENLAYOUT_SIZE_LARGE) {
  // on a large screen device ...

}
inputs: Description:
BitmapFactory.decodeFile out of memory with images 2400x2400

Implementation:
targets: BitmapFactory.Options options = new BitmapFactory.Options();
 options.inJustDecodeBounds = false;
 options.inPreferredConfig = Config.RGB_565;
 options.inDither = true;
inputs: Given the following code:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
Describe it:
targets: Android: making a fullscreen application
inputs: Given the following code:
FragmentB fragmentB = (FragmentB)getFragmentManager().findFragmentById(R.id.fragmentBId);
fragmentB.performSomeTask();
Describe it:
targets: Call fragment events from activity
inputs: Given the following code:
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT,
    "Hey check out my app at: https://play.google.com/store/apps/details?id=com.google.android.apps.plus");
sendIntent.setType("text/plain");
startActivity(sendIntent);
Describe it:
targets: How to Share Entire Android App with Share Intent
inputs: Description:
How to prevent Screen Capture in Android

Implementation:
targets: getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,
                           WindowManager.LayoutParams.FLAG_SECURE);
inputs: Description:
How to check availability of space on external storage?

Implementation:
targets: File externalStorageDir = Environment.getExternalStorageDirectory();
StatFs statFs = new StatFs(externalStorageDir.getAbsolutePath());  
long blocks = statFs.getAvailableBlocks();
long free = (blocks * statFs.getBlockSize()) / 1024 / 1024;
inputs: Description:
Linking back to amazon app store for ratings

Implementation:
targets: Intent goToAppstore = new Intent(Intent.ACTION_VIEW,Uri.parse("http://www.amazon.com/gp/mas/dl/andro" +"id?p=com.yapp.blah"));
goToAppstore.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(goToAppstore);
inputs: Given the following code:
anim.setAnimationListener(new Animation.AnimationListener(){
    @Override
    public void onAnimationStart(Animation arg0) {
    }           
    @Override
    public void onAnimationRepeat(Animation arg0) {
    }           
    @Override
    public void onAnimationEnd(Animation arg0) {
    }
});
Describe it:
targets: End animation event android
inputs: Description:
Cancelling a PendingIntent

Implementation:
targets: PendingIntent.getBroadcast(context, 0, intent, 
                           PendingIntent.FLAG_UPDATE_CURRENT).cancel();
inputs: Given the following code:
density = getResources().getDisplayMetrics().density;

// return 0.75 if it's LDPI
// return 1.0 if it's MDPI
// return 1.5 if it's HDPI
// return 2.0 if it's XHDPI
// return 3.0 if it's XXHDPI
// return 4.0 if it's XXXHDPI
Describe it:
targets: How to check an Android device is HDPI screen or MDPI screen?
inputs: Description:
android disable seek bar for audio controller

Implementation:
targets: seekBar.setOnTouchListener(new OnTouchListener(){
        @Override
        public boolean onTouch(View v, MotionEvent event) {
            return true;
        }
    });
inputs: Description:
How to disable and enable the scrolling on android ScrollView?

Implementation:
targets: mScrollView.setOnTouchListener( new OnTouchListener() {

            @Override
            public boolean onTouch(View v, MotionEvent event) 
            {
                  return true;
            }
});
inputs: Given the following code:
final TypedArray styledAttributes = getContext().getTheme().obtainStyledAttributes(
                    new int[] { android.R.attr.actionBarSize });
mActionBarSize = (int) styledAttributes.getDimension(0, 0);
styledAttributes.recycle();
Describe it:
targets: What is the size of ActionBar in pixels?
inputs: Description:
Retrieving Android API version programmatically

Implementation:
targets: if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP){
    // Do something for lollipop and above versions
} else{
    // do something for phones running an SDK before lollipop
}
inputs: Description:
How to check an Android device is HDPI screen or MDPI screen?

Implementation:
targets: density = getResources().getDisplayMetrics().density;

// return 0.75 if it's LDPI
// return 1.0 if it's MDPI
// return 1.5 if it's HDPI
// return 2.0 if it's XHDPI
// return 3.0 if it's XXHDPI
// return 4.0 if it's XXXHDPI
inputs: Given the following code:
Intent intentOpenBluetoothSettings = new Intent();
intentOpenBluetoothSettings.setAction(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS); 
startActivity(intentOpenBluetoothSettings);
Describe it:
targets: How do I open the Bluetooth Settings Activity programmatically?
inputs: Description:
How to Programmatically Enable/Disable Accessibility Service in Android

Implementation:
targets: Settings.Secure.putString(getContentResolver(), 
    Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, "pkgname/classname");
Settings.Secure.putString(getContentResolver(), 
    Settings.Secure.ACCESSIBILITY_ENABLED, "1");
inputs: Description:
No animation on item removal on RecyclerView

Implementation:
targets: myDataset.remove(position); // myDataset is List<MyObject>
mAdapter.notifyItemRemoved(position);
inputs: Given the following code:
Intent intent = new Intent(Intent.ACTION_DIAL); 
startActivity(intent);
Describe it:
targets: How to open number dialer pad programmatically in android?
inputs: Description:
How to show marker in Maps launched by geo uri Intent?

Implementation:
targets: Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:<lat>,<long>?q=<lat>,<long>(Label+Name)"));
startActivity(intent);
inputs: Description:
Send request over Mobile data when WIFI is ON.(Android L)

Implementation:
targets: builder.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
builder.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR);
inputs: Given the following code:
mWebView.getSettings().setAppCacheEnabled(false);
        mWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
Describe it:
targets: How to disable cache in android webview?
inputs: Description:
Identifying RTL language in Android

Implementation:
targets: Configuration config = getResources().getConfiguration();
if(config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
    //in Right To Left layout
}
inputs: Description:
Android: Cloning a drawable in order to make a StateListDrawable with filters

Implementation:
targets: Drawable clone = drawable.getConstantState().newDrawable();
inputs: Given the following code:
button.setOnTouchListener(new OnTouchListener() {

  @Override
  public boolean onTouch(View v, MotionEvent event) {
   // TODO Auto-generated method stub
   return false;
  }
  });
Describe it:
targets: Triggering event when Button is pressed down in Android
inputs: Given the following code:
@Override
  public void onDrawerSlide(View drawerView, float slideOffset) 
  {
        if(drawerView!=null && drawerView == rightDrawerListView){
              super.onDrawerSlide(drawerView, 0);
        }else{
              super.onDrawerSlide(drawerView, slideOffset);
        }
  }
Describe it:
targets: Disable animation of drawer icon in double navigation drawer for right drawer
inputs: Description:
Get URI from drawable image

Implementation:
targets: Resources resources = context.getResources();
Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + resources.getResourcePackageName(resId) + '/' + resources.getResourceTypeName(resId) + '/' + resources.getResourceEntryName(resId) );
inputs: Given the following code:
public int getStatusBarHeight() {
   int result = 0;
   int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
   if (resourceId > 0) {
      result = getResources().getDimensionPixelSize(resourceId);
   }
   return result;
}
Describe it:
targets: Height of statusbar?
inputs: Given the following code:
myWebView.setWebViewClient(new WebViewClient() {
    public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
        myWebView.loadUrl("file:///android_asset/custom_url_error.htm");

    }
});
Describe it:
targets: How to edit or create custom error page for WebView?
inputs: Description:
Android version check

Implementation:
targets: // Check if we're running on Android 5.0 or higher
if (Build.VERSION.SDK_INT >= 21) {
    // Call some material design APIs here
} else {
    // Implement this feature without material design
}
inputs: Given the following code:
Intent gpsOptionsIntent = new Intent(  
    android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);  
startActivity(gpsOptionsIntent);
Describe it:
targets: How to prompt user to enable GPS_PROVIDER and/or NETWORK_PROVIDER?
inputs: Given the following code:
Intent intent = getIntent();
finish();
startActivity(intent);
Describe it:
targets: How do I restart an Android Activity
inputs: Description:
How to hide current location in google map?

Implementation:
targets: map.setMyLocationEnabled(false);
map.getUiSettings().setMyLocationButtonEnabled(false);
inputs: Description:
Intercept and override HTTP requests from WebView

Implementation:
targets: webView.setWebViewClient(new WebViewClient() {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        if (url.startsWith("foo://")) {
            // magic
            return true;
        }
        return false;
    }
});
inputs: Given the following code:
AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
audioManager.isWiredHeadsetOn();
Describe it:
targets: Check whether headphones are plugged in
inputs: Description:
Android - Set text to TextView

Implementation:
targets: // globally 
TextView myAwesomeTextView = (TextView)findViewById(R.id.myAwesomeTextView);

//in your OnCreate() method
myAwesomeTextView.setText("My Awesome Text");
inputs: Given the following code:
@Override
protected void onSizeChanged(int xNew, int yNew, int xOld, int yOld){
    super.onSizeChanged(xNew, yNew, xOld, yOld);

    viewWidth = xNew;
    viewHeight = yNew;
}
Describe it:
targets: Android: How to get a custom View's height and width?
inputs: Description:
How to delete a whole folder and content?

Implementation:
targets: void deleteRecursive(File fileOrDirectory) {
    if (fileOrDirectory.isDirectory())
        for (File child : fileOrDirectory.listFiles())
            deleteRecursive(child);

    fileOrDirectory.delete();
}
inputs: Given the following code:
webView.setWebViewClient(new WebViewClient() {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        if (url.startsWith("foo://")) {
            // magic
            return true;
        }
        return false;
    }
});
Describe it:
targets: Intercept and override HTTP requests from WebView
inputs: Given the following code:
Room.databaseBuilder(context.getApplicationContext(), 
                     AppDatabase.class, 
                     "database_name.db")
.openHelperFactory(new AssetSQLiteOpenHelperFactory())
.allowMainThreadQueries()
.build();
Describe it:
targets: How to use Room Persistence Library with pre-populated database?
inputs: Description:
Disable Action Bar button in Android

Implementation:
targets: if (disableButtonFlag) {
    menu.findItem(R.id.your_item).setEnabled(false);
} else {
    menu.findItem(R.id.your_item).setEnabled(true);
}
inputs: Description:
RecyclerView blinking after notifyDatasetChanged()

Implementation:
targets: ItemAnimator animator = recyclerView.getItemAnimator();
if (animator instanceof SimpleItemAnimator) {
  ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
}
inputs: Description:
How to turn on the GPS on Android

Implementation:
targets: Intent i = new
Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(i);
inputs: Description:
How to get a reference to LocationManager inside a Fragment

Implementation:
targets: LocationManager mgr = 
(LocationManager)getActivity().getSystemService(Context.LOCATION_SERVICE);