In your code you have inflated the your view separately and set the layout in your dialog explicitly. So there is not use of View layout
in your code as you have explicitly set the layout dialog.setContentView(R.layout.wish_dialog);
whereas it should be like dialog.setContentView(layout);
You need to change your below code:
// custom dialog
final Dialog dialog = new Dialog((Activity) mContext);
View layout = ((Activity) mContext).findViewById(R.layout.wish_dialog);
dialog.setContentView(R.layout.wish_dialog);
dialog.setTitle("Wish");
ImageView image = (ImageView) ((Activity) mContext).findViewById(R.id.image_display);
TextView title = (TextView) ((Activity) mContext).findViewById(R.id.title_display);
TextView desc = (TextView) ((Activity) mContext).findViewById(R.id.desc_display);
TextView loc = (TextView) ((Activity) mContext).findViewById(R.id.loc_display);
..................................
Change above code as below:
// custom dialog
final Dialog dialog = new Dialog((Activity) mContext);
LayoutInflater mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View layout = mInflater.inflate(R.layout.wish_dialog);
dialog.setContentView(layout);
dialog.setTitle("Wish");
ImageView image = (ImageView)layout.findViewById(R.id.image_display);
TextView title = (TextView) layout .findViewById(R.id.title_display);
TextView desc = (TextView) layout .findViewById(R.id.desc_display);
TextView loc = (TextView) layout .findViewById(R.id.loc_display);
TextView url = (TextView) layout .findViewById(R.id.url_display);
RatingBar rating = (RatingBar)layout .findViewById(R.id.priority_display);
TextView price = (TextView)layout .findViewById(R.id.price_display);
TextView barcode = (TextView)layout .findViewById(R.id.ean_display);
TextView date = (TextView) layout .findViewById(R.id.date_display);
Button button = (Button) layout .findViewById(R.id.button_display