proguard-rules Examples
-keep class com.github.mikephil.charting.** { *; } -keep class android.support.** { *; } -keep class net.time4j.** { *; }
-keep class com.github.mikephil.charting.** { *; } -keep class android.support.** { *; } -keep class net.time4j.** { *; }
final Manifest file :
app/build/intermediates/manifests/full/debug/AndroidManifest.xml
where did it exactly these permissions came from?
app/build/outputs/logs/manifest-merger-debug-report.txt
So the solution is :
<uses-permission android:name=”android.permission.RECORD_AUDIO” tools:node=”remove” />
Even if another library is asking for this specific permission, the build will be forced to not merge it in your final Manifest file
Just found this and it works like a charm:
myNumberPicker.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);
You can also set this in XML:
android:descendantFocusability="blocksDescendants"
References
https://stackoverflow.com/questions/8854781/disable-soft-keyboard-on-numberpicker
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){ //Do something }
References
https://stackoverflow.com/questions/18664450/how-to-use-a-function-only-if-the-version-is-11
build.gradle
android { defaultConfig { ... minSdkVersion 21 targetSdkVersion 25 multiDexEnabled true } ... } dependencies { compile 'com.android.support:multidex:1.0.1' }
public class MyApplication extends MultiDexApplication
References
https://developer.android.com/studio/build/multidex.html
https://stackoverflow.com/questions/37312103/unable-to-get-provider-com-google-firebase-provider-firebaseinitprovider
VBoxManage modifyhd MyLinux.vdi --resize 100000
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { if (dy > 0 ||dy<0 && fab.isShown()) { fab.hide(); } } @Override public void onScrollStateChanged(RecyclerView recyclerView, int newState) { if (newState == RecyclerView.SCROLL_STATE_IDLE) { fab.show(); } super.onScrollStateChanged(recyclerView, newState); } });
References
https://github.com/mhdr/AndroidSamples/tree/master/095
https://stackoverflow.com/questions/33208613/hide-floatingactionbutton-on-scroll-of-recyclerview
@Transactional(readOnly = false) public interface FormRowRepository extends JpaRepository<FormRow, Long> { List<FormRow> findByForm(Form form); void deleteById(Long id); void deleteById(List<Long> ids); }
References
https://stackoverflow.com/questions/10394857/how-to-use-transactional-with-spring-data
spinnerObject.setSelection(position);
References
https://stackoverflow.com/questions/11072576/set-selected-item-of-spinner-programmatically