Android Build Error: UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0" Get link Facebook X Pinterest Email Other Apps April 13, 2016 Change the build tool version buildToolsVersion "24.0.0 rc2" to buildToolsVersion "23.0.2" Get link Facebook X Pinterest Email Other Apps Comments
Android: Ping an external server from android device March 11, 2016 // ping external servers public static final String PING_ONE = "ping -c 1 your server IP" ; public static final String PING_TWO = "ping -c 1 your server IP " ; try { Process p1 = java.lang.Runtime. getRuntime ().exec( PING_ONE ); int p1RetExitVal = p1.waitFor(); if (p1RetExitVal == 0 ) { // Internet available networkState = true ; } else { Process p2 = java.lang.Runtime. getRuntime ().exec( PING_TWO ); int p2RetExitVal = p2.waitFor(); if (p2RetExitVal == 0 ) { // Internet available networkState = true ; } } } catch (Exception e) { networkState = false ; e.printStackTrace(); } Read more
RecyclerView item animation May 16, 2019 if (imageView. isSelected ) { ValueAnimator.ofInt(size, (size * 1.8 ).toInt()). apply { addUpdateListener { values -> imageView. layoutParams . width = values. animatedValue as Int imageView. layoutParams . height = values. animatedValue as Int imageView.requestLayout() } duration = 200 start() } val anim = ScaleAnimation( 0.5f , 1f , 0.5f , 1f , Animation. RELATIVE_TO_SELF , 0.5f , Animation. RELATIVE_TO_SELF , 0.5f ) anim. fillAfter = true imageView.startAnimation(anim) } else { imageView. layoutParams . width = size imageView. layoutParams . height = size } Read more
Android: WebView back navigation March 11, 2016 webview = (WebView) rootView.findViewById(R.id. testWebView ); webview .setWebViewClient( new MyBrowser()); private class MyBrowser extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true ; } } Read more
Comments
Post a Comment