当前位置: 首页>>代码示例>>Java>>正文


Java FloatingActionButton.setRippleColor方法代码示例

本文整理汇总了Java中android.support.design.widget.FloatingActionButton.setRippleColor方法的典型用法代码示例。如果您正苦于以下问题:Java FloatingActionButton.setRippleColor方法的具体用法?Java FloatingActionButton.setRippleColor怎么用?Java FloatingActionButton.setRippleColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.design.widget.FloatingActionButton的用法示例。


在下文中一共展示了FloatingActionButton.setRippleColor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initViews

import android.support.design.widget.FloatingActionButton; //导入方法依赖的package包/类
@Override
public void initViews(View view) {

    recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
    recyclerView.setHasFixedSize(true);
    recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));

    refresh = (SwipeRefreshLayout) view.findViewById(R.id.refreshLayout);
    //设置下拉刷新的按钮的颜色
    refresh.setColorSchemeResources(R.color.colorPrimary);

    fab = (FloatingActionButton) getActivity().findViewById(R.id.fab);
    fab.setRippleColor(getResources().getColor(R.color.colorPrimaryDark));

    tabLayout = (TabLayout) getActivity().findViewById(R.id.tab_layout);

}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:ZhihuDailyFragment.java

示例2: onCreate

import android.support.design.widget.FloatingActionButton; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_home);
    FragmentTransaction transaction =getSupportFragmentManager().beginTransaction();
    transaction.replace(R.id.home_fragment_container, new ImageListFragment());
    transaction.commit();
    share = (FloatingActionButton) findViewById(R.id.home_share);
    share.setRippleColor(Color.BLUE);
    share.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Intent loginActivityIntent = new Intent(HomeActivity.this, ShareImageActivity.class);
            startActivity(loginActivityIntent);
        }
    });
}
 
开发者ID:hphamid,项目名称:maktabkhoone-instagram,代码行数:18,代码来源:HomeActivity.java

示例3: initViews

import android.support.design.widget.FloatingActionButton; //导入方法依赖的package包/类
@Override
public void initViews(View view) {

    recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
    recyclerView.setHasFixedSize(true);
    recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));

    fab = (FloatingActionButton) getActivity().findViewById(R.id.fab);
    fab.setRippleColor(getResources().getColor(R.color.colorPrimaryDark));

    refreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.refreshLayout);
    //设置下拉刷新的按钮的颜色
    refreshLayout.setColorSchemeResources(R.color.colorPrimary);

}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:DoubanMomentFragment.java


注:本文中的android.support.design.widget.FloatingActionButton.setRippleColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。