本文整理汇总了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);
}
示例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);
}
});
}
示例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);
}