This file contains 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
int dp = 123; | |
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, getResources().getDisplayMetrics()); |
This file contains 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
TypedValue typed_value = new TypedValue(); | |
getActivity().getTheme().resolveAttribute(android.support.v7.appcompat.R.attr.actionBarSize, typed_value, true); | |
mSwipeRefreshLayout.setProgressViewOffset(false, 0, getResources().getDimensionPixelSize(typed_value.resourceId)); |
This file contains 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
android.support.v7.app.ActionBarDrawerToggle mDrawerToggle; | |
android.support.v4.widget.DrawerLayout mDrawerLayout; | |
public void burgerArrowTransition(final boolean burgerToArrow) { | |
float start, end; | |
mDrawerToggle.setDrawerIndicatorEnabled(true); | |
if(burgerToArrow) { | |
start = 0.0f; |
This file contains 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
//add dependency: com.google.maps.android:android-maps-utils:0.3.4 | |
GoogleMap map; //map reference | |
LatLng point; //LatLng point reference | |
String markerText = "123"; //text on marker | |
IconGenerator iconFactory = new IconGenerator(context); | |
iconFactory.setBackground(context.getResources().getDrawable(R.drawable.custom_marker)); | |
iconFactory.setTextAppearance(context, R.style.custom_text_apperance); | |
Bitmap icon = iconFactory.makeIcon(markerText); |
NewerOlder