跳至主要内容

android fab button

gradle file:
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
layout.xml
<android.support.design.widget.FloatingActionButton    
android:layout_width="wrap_content"    
android:src="@android:drawable/ic_media_play"   
 android:elevation="6dp"    
android:background="@color/colorAccent"   
 android:layout_margin="16dp"   
 app:pressedTranslationZ="12dp"    
android:layout_height="wrap_content" />

Theme.AppCompat

class extend AppCompatActivity

评论

此博客中的热门博文

android hide actionbar

public class MainActivity extends Activity { ActionBar actionBar; //声明ActionBar @Override protected void onCreate( Bundle savedInstanceState) { super .onCreate(savedInstanceState); setContentView( R .layout.activity_main); actionBar = getSupportActionBar(); //得 到ActionBar actionBar.hide(); //隐藏ActionBar } }

go url encoding

func  QueryUnescape func QueryUnescape (s string ) ( string , error ) QueryUnescape does the inverse transformation of QueryEscape, converting %AB into the byte 0xAB and '+' into ' ' (space). It returns an error if any % is not followed by two hexadecimal digits. func  QueryUnescape func QueryUnescape (s string ) ( string , error ) QueryUnescape does the inverse transformation of QueryEscape, converting %AB into the byte 0xAB and '+' into ' ' (space). It returns an error if any % is not followed by two hexadecimal digits.