-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an imageview instead of search hint #299
Comments
@mladenbabic Have you solved this problem yet? Looking forward to sharing |
@vutrannguyen Yes, but it is too much customized for my project and it won't be helpful for you. |
Toolbar headerMain = view.findViewById(R.id.headerMain);
SearchInputView searchBar = headerMain.findViewById(R.id.search_bar_text);
ImageView imageView = new ImageView(getContext());
imageView.setImageResource(R.drawable.logo);
FrameLayout frameLayout = headerMain.findViewById(R.id.search_input_parent);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT
);
layoutParams.setMargins(-80,15,0,15);
layoutParams.addRule(RelativeLayout.BELOW, R.id.search_input_parent);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
frameLayout.addView(imageView, layoutParams); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: