com.wangjie.rapidfloatingactionbutton.RapidFloatingActionLayout Java Examples
The following examples show how to use
com.wangjie.rapidfloatingactionbutton.RapidFloatingActionLayout.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivity.java From samples-android with Apache License 2.0 | 6 votes |
private void initFabBtn() { RapidFloatingActionButton fab = findViewById(R.id.fab); RapidFloatingActionLayout fabLayout = findViewById(R.id.fab_layout); RapidFloatingActionContentLabelList rfaContent = new RapidFloatingActionContentLabelList(this); rfaContent.setOnRapidFloatingActionContentLabelListListener(this); List<RFACLabelItem> items = new ArrayList<>(); items.add(new RFACLabelItem<Integer>() .setLabel(getString(R.string.scan_qr_code)) ); items.add(new RFACLabelItem<Integer>() .setLabel(getString(R.string.input_manually)) ); rfaContent.setItems(items); fabHelper = new RapidFloatingActionHelper( this, fabLayout, fab, rfaContent ).build(); }
Example #2
Source File: CardListSampleActivity.java From RapidFloatingActionButton with Apache License 2.0 | 5 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.card_list_sample); rfaLayout = (RapidFloatingActionLayout) findViewById(R.id.card_list_sample_rfal); rfaButton = (RapidFloatingActionButton) findViewById(R.id.card_list_sample_rfab); RapidFloatingActionContentCardListView rfaContent = new RapidFloatingActionContentCardListView(this); rfaContent.setOnRapidFloatingActionContentCardListViewListener(this); List<CardItem> cardItems = new ArrayList<>(); cardItems.add(new CardItem().setName("wangjie").setResId(R.mipmap.head_test_a)); cardItems.add(new CardItem().setName("tiantian").setResId(R.mipmap.head_test_b)); cardItems.add(new CardItem().setName("wangjiegulu").setResId(R.mipmap.head_test_c)); cardItems.add(new CardItem().setName("咕噜不爱猫").setResId(R.mipmap.head_test_d)); rfaContent.setList(cardItems); rfaLayout.setIsContentAboveLayout(false); rfaLayout.setDisableContentDefaultAnimation(true); rfabHelper = new RapidFloatingActionHelper( this, rfaLayout, rfaButton, rfaContent ).build(); }
Example #3
Source File: FragmentA.java From RapidFloatingActionButton with Apache License 2.0 | 5 votes |
@Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.rfab_group_sample_fragment_a, null); rfaLayout = (RapidFloatingActionLayout) view.findViewById(R.id.rfab_group_sample_fragment_a_rfal); return view; }
Example #4
Source File: FragmentC.java From RapidFloatingActionButton with Apache License 2.0 | 5 votes |
@Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.rfab_group_sample_fragment_c, null); rfaLayout = (RapidFloatingActionLayout) view.findViewById(R.id.rfab_group_sample_fragment_c_rfal); return view; }
Example #5
Source File: LabelListSampleActivity.java From RapidFloatingActionButton with Apache License 2.0 | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.label_list_sample); rfaLayout = (RapidFloatingActionLayout) findViewById(R.id.label_list_sample_rfal); rfaButton = (RapidFloatingActionButton) findViewById(R.id.label_list_sample_rfab); /* // 可通过代码设置属性 rfaLayout.setFrameColor(Color.RED); rfaLayout.setFrameAlpha(0.4f); rfaButton.setNormalColor(0xff37474f); rfaButton.setPressedColor(0xff263238); rfaButton.getRfabProperties().setShadowDx(ABTextUtil.dip2px(this, 3)); rfaButton.getRfabProperties().setShadowDy(ABTextUtil.dip2px(this, 3)); rfaButton.getRfabProperties().setShadowRadius(ABTextUtil.dip2px(this, 5)); rfaButton.getRfabProperties().setShadowColor(0xffcccccc); rfaButton.getRfabProperties().setStandardSize(RFABSize.MINI); rfaButton.build(); */ RapidFloatingActionContentLabelList rfaContent = new RapidFloatingActionContentLabelList(this); rfaContent.setOnRapidFloatingActionContentLabelListListener(this); List<RFACLabelItem> items = new ArrayList<>(); items.add(new RFACLabelItem<Integer>() .setLabel("Github: wangjiegulu") .setResId(R.mipmap.ico_test_d) .setIconNormalColor(0xffd84315) .setIconPressedColor(0xffbf360c) .setWrapper(0) ); items.add(new RFACLabelItem<Integer>() .setLabel("[email protected]") // .setResId(R.mipmap.ico_test_c) .setDrawable(getResources().getDrawable(R.mipmap.ico_test_c)) .setIconNormalColor(0xff4e342e) .setIconPressedColor(0xff3e2723) .setLabelColor(Color.WHITE) .setLabelSizeSp(14) .setLabelBackgroundDrawable(RFABShape.generateCornerShapeDrawable(0xaa000000, RFABTextUtil.dip2px(this, 4))) .setWrapper(1) ); items.add(new RFACLabelItem<Integer>() .setLabel("WangJie") .setResId(R.mipmap.ico_test_b) .setIconNormalColor(0xff056f00) .setIconPressedColor(0xff0d5302) .setLabelColor(0xff056f00) .setWrapper(2) ); items.add(new RFACLabelItem<Integer>() .setLabel("Compose") .setResId(R.mipmap.ico_test_a) .setIconNormalColor(0xff283593) .setIconPressedColor(0xff1a237e) .setLabelColor(0xff283593) .setWrapper(3) ); rfaContent .setItems(items) .setIconShadowRadius(RFABTextUtil.dip2px(this, 5)) .setIconShadowColor(0xff888888) .setIconShadowDy(RFABTextUtil.dip2px(this, 5)) ; rfabHelper = new RapidFloatingActionHelper( this, rfaLayout, rfaButton, rfaContent ).build(); }
Example #6
Source File: OnRapidFloatingActionListener.java From dhis2-android-capture-app with BSD 3-Clause "New" or "Revised" License | 2 votes |
/** * 获取当前的RFAL对象 * * @return */ RapidFloatingActionLayout obtainRFALayout();
Example #7
Source File: OnRapidFloatingActionListener.java From RapidFloatingActionButton with Apache License 2.0 | 2 votes |
/** * 获取当前的RFAL对象 * * @return */ RapidFloatingActionLayout obtainRFALayout();