<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@android:drawable/ic_input_add" />
FloatingActionButton fb = (FloatingActionButton) mContentView.findViewById(R.id.fab);
fb.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#fea700")));
fb.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Analytics.getInstance(getActivity()).sendEvent("mode页面","点击添加自定义按钮");
Intent intntBT_Advance_Customized_Mode = new Intent(getActivity(), BT_Advance_Customized_Mode.class);
intntBT_Advance_Customized_Mode.putExtra("Mode", "Advance_Customized_Mode");
startActivityForResult(intntBT_Advance_Customized_Mode, 0);
}
});