use of android.support.v7.widget.RecyclerView.LayoutParams in project ToolBarLib by jjhesk.
the class TopBarManager method triggerForCustomExternalCustomView.
public void triggerForCustomExternalCustomView() {
if (toolbar_resid == 0)
return;
Toolbar.LayoutParams layoutParams = new Toolbar.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
layoutParams.gravity = Gravity.TOP;
final View h = ToolbarHelper.generateView(toolbar_resid, ctx);
toolbar.addView(h, layoutParams);
actionbar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
// h.bringToFront();
}
use of android.support.v7.widget.RecyclerView.LayoutParams in project InstaMaterial by frogermcs.
the class UserProfileAdapter method onCreateViewHolder.
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
final View view = LayoutInflater.from(context).inflate(R.layout.item_photo, parent, false);
StaggeredGridLayoutManager.LayoutParams layoutParams = (StaggeredGridLayoutManager.LayoutParams) view.getLayoutParams();
layoutParams.height = cellSize;
layoutParams.width = cellSize;
layoutParams.setFullSpan(false);
view.setLayoutParams(layoutParams);
return new PhotoViewHolder(view);
}
use of android.support.v7.widget.RecyclerView.LayoutParams in project ListenerMusicPlayer by hefuyicoder.
the class ArtistDetailFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_artist_detail, container, false);
if (Build.VERSION.SDK_INT >= 19 && Build.VERSION.SDK_INT < 21) {
root.findViewById(R.id.app_bar).setFitsSystemWindows(false);
root.findViewById(R.id.artist_art).setFitsSystemWindows(false);
root.findViewById(R.id.gradient).setFitsSystemWindows(false);
Toolbar toolbar = (Toolbar) root.findViewById(R.id.toolbar);
CollapsingToolbarLayout.LayoutParams layoutParams = (CollapsingToolbarLayout.LayoutParams) toolbar.getLayoutParams();
layoutParams.height += DensityUtil.getStatusBarHeight(getContext());
toolbar.setLayoutParams(layoutParams);
toolbar.setPadding(0, DensityUtil.getStatusBarHeight(getContext()), 0, 0);
}
return root;
}
use of android.support.v7.widget.RecyclerView.LayoutParams in project ListenerMusicPlayer by hefuyicoder.
the class AlbumDetailFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_album_detail, container, false);
if (Build.VERSION.SDK_INT >= 19 && Build.VERSION.SDK_INT < 21) {
root.findViewById(R.id.app_bar).setFitsSystemWindows(false);
root.findViewById(R.id.album_art).setFitsSystemWindows(false);
root.findViewById(R.id.gradient).setFitsSystemWindows(false);
Toolbar toolbar = (Toolbar) root.findViewById(R.id.toolbar);
CollapsingToolbarLayout.LayoutParams layoutParams = (CollapsingToolbarLayout.LayoutParams) toolbar.getLayoutParams();
layoutParams.height += DensityUtil.getStatusBarHeight(getContext());
toolbar.setLayoutParams(layoutParams);
toolbar.setPadding(0, DensityUtil.getStatusBarHeight(getContext()), 0, 0);
}
return root;
}
use of android.support.v7.widget.RecyclerView.LayoutParams in project ListenerMusicPlayer by hefuyicoder.
the class PlaylistDetailFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_album_detail, container, false);
if (Build.VERSION.SDK_INT >= 19 && Build.VERSION.SDK_INT < 21) {
root.findViewById(R.id.app_bar).setFitsSystemWindows(false);
root.findViewById(R.id.album_art).setFitsSystemWindows(false);
root.findViewById(R.id.gradient).setFitsSystemWindows(false);
Toolbar toolbar = (Toolbar) root.findViewById(R.id.toolbar);
CollapsingToolbarLayout.LayoutParams layoutParams = (CollapsingToolbarLayout.LayoutParams) toolbar.getLayoutParams();
layoutParams.height += DensityUtil.getStatusBarHeight(getContext());
toolbar.setLayoutParams(layoutParams);
toolbar.setPadding(0, DensityUtil.getStatusBarHeight(getContext()), 0, 0);
}
return root;
}
Aggregations