This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public boolean dispatchTouchEvent(MotionEvent event) { | |
| if (event.getAction() == MotionEvent.ACTION_DOWN) { | |
| View v = getCurrentFocus(); | |
| if (v != null) imm.hideSoftInputFromWindow(v.getWindowToken(), 0); | |
| if (v instanceof EditText) { | |
| Rect outRect = new Rect(); | |
| v.getGlobalVisibleRect(outRect); | |
| if (!outRect.contains((int) event.getRawX(), (int) event.getRawY())) { | |
| v.clearFocus(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM, | |
| WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM); | |
| imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); | |
| imm.hideSoftInputFromWindow(findViewById(android.R.id.content).getWindowToken(), 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /************************************************/ | |
| // To uninstall any application from the device use "pm uninstall -k --user 0 com.default.yourapp" | |
| // @ATTENTION uninstall app with this command disalow the possibility to reinstall it, you'll need to refactory the phone to get it back ! | |
| // To search a package name "adb shell pm list packages | grep <search-term>" | |
| /************************************************/ | |
| // To use this command in terminal start it by first "adb root" | |
| // Then "adb shell" + "yourCOMMAND" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*** Pour filtrer ce qu'on ne veux pas voir*/ | |
| // ^(?!.*(Ce que|je veux | pas voir *)).*$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void onExportDataButtonClick(View view) { | |
| Log.d(TAG, "onExportDataButtonClick: " + checkIfUsbKeyExists()); | |
| if (checkIfUsbKeyExists()) { | |
| exportDB(); | |
| new convertDBToCSV().execute(tables); | |
| } | |
| } | |
| public boolean checkIfUsbKeyExists() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.elfefe.X.utils; | |
| import java.text.SimpleDateFormat; | |
| import java.util.Calendar; | |
| public class DateManager { | |
| private int year; | |
| private int month; | |
| private int day; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <--! <content> is your url --> | |
| https://chart.apis.google.com/chart?chs=150x150&cht=qr&chl=<content>&choe=UTF-8 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Intent i = context.getPackageManager(). | |
| getLaunchIntentForPackage(context.getPackageName()); | |
| i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |
| i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | |
| context.startActivity(i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private ArrayList<String> initTable(String... strings){ | |
| return new ArrayList<>(Arrays.asList(strings)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker exec -it YOUR_CONTAINER_TAG bash | |
| docker exec -itu 0 YOUR_CONTAINER_TAG bash |
OlderNewer