...
Code Block |
---|
|
// DefaultPopToolbarHolder 상속
public class CustomPopToolbarHolder extends DefaultPopToolbarHolder {
@Override
public View getView(Activity activity, @NonNull final String unitId) {
// 직접 구성한 layout 을 사용합니다
ViewGroup root = (ViewGroup) activity.getLayoutInflater().inflate(R.layout.view_pop_custom_toolbar, null);
View buttonInquiry = root.findViewById(R.id.buttonInquiryyourInquiryButton);
buttonInquiry.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// 문의하기 페이지 열기
showInquiry(activity, unitId);
}
});
return root;
}
} |
CustomPopToolbarHolder
에서 사용하는 layout.view_pop_custom_toolbar
은 다음과 같습니다.
Code Block |
---|
|
<!-- view_pop_custom_toolbar.xml -->
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal"
android:background="@color/bzv_white_100">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="16dp">
<ImageView
android:id="@+id/imageIconyourImageIcon"
android:layout_width="154dp"
android:layout_height="24dp"
android:src="@drawable/bz_img_buzzvil_logo" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<ImageView
android:id="@+id/buttonInquiryyourInquiryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="16dp"
android:src="@drawable/bzv_ic_circle_question"
android:tint="@color/bzv_gray_light" />
</LinearLayout>
</LinearLayout> |
...