Android: launch android dialer with mobile number Get link Facebook X Pinterest Email Other Apps December 26, 2016 Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + mContactNo.getText().toString())); startActivity(intent); Get link Facebook X Pinterest Email Other Apps Comments
change svg android drawable color March 06, 2017 private void changeSearchDrawable() { Drawable drawable = ResourcesCompat. getDrawable (getResources(), R.drawable. icon_search , getTheme()); int colorVal; if (Build.VERSION. SDK_INT >= Build.VERSION_CODES. M ) { colorVal = this .getResources().getColor(R.color. nnnow_pink , getTheme()); } else { colorVal = this .getResources().getColor(R.color. nnnow_pink ); } drawable.setColorFilter(colorVal, PorterDuff.Mode. SRC_ATOP ); check .setImageDrawable(drawable); } Read more
Android View Collapse and Expand Animations September 22, 2016 // To animate view slide out public void collapseView(View view) { HeightAnimation heightAnim = new HeightAnimation(view, view.getHeight(), 0 ); heightAnim.setDuration( 500 ); view.startAnimation(heightAnim); } // To animate view slide in public void expandView(View view) { HeightAnimation heightAnim = new HeightAnimation(view, 0 , ( int ) ( 51 * AppDisplayManager. getInstance ().getDeviceDensity())); heightAnim.setDuration( 200 ); view.startAnimation(heightAnim); } public class HeightAnimation extends Animation { protected final int originalHeight ; protected final View view ; protected float perValue ; public HeightAnimation(View view, int fromHeight, int toHeight) { this . view = view; this . originalHeight = fromHeight; this . perValue = (toHeight - fromHeight); } @Override protected void applyTransformation( float interpolatedTime, Transformation t) { view .getLayoutParams(). hei... Read more
Android: ListView Pagination March 11, 2016 While having pagination do not re create the adapter object, instead update the existing adapter object. so that the list view will not be refreshed or re created. It will be updated with new items. Read more
Comments
Post a Comment