Skip to content

Instantly share code, notes, and snippets.

public ScrollableShareView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
inflate(context, R.layout.widget_scrollable_share, this);
ButterKnife.inject(this);
callMethodThatCausesNullPointerException(); // This is the method that actually causes the issue, and I want the line number for the null pointer exception to this to show up in logcat
}
04-28 16:29:41.182 1332-1332/com.mycompany.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
android.view.InflateException: Binary XML file line #22: Error inflating class com.mycompany.app.ui.widgets.SharePhotoView
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.inflate(LayoutInflater.java:459)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.view.View.inflate(View.java:16119)
at com.mycompany.app.ui.widgets.PhotoView.createViews(PhotoView.java:83)
//OnClickListener stub
public class ButtonListener implements OnClickListener {
private UpdateUIListener mUIListener;
public ButtonListener(UpdateUIListener uiListener){
mUIListener = uiListener;
}
@Override
1 <%= render :partial => 'comic_thumb', :collection => @comics %>
Partial:
1 <%= "Name: #{comic_thumb.name}" %> <br />
2 <%= image_tag comic_thumb.image_strip.url(:thumb) %> <br />
3 <%= "Description: #{comic_thumb.description}" %> <br />
7 <% @comics.each do |comic| %>
8 <%= "Name: #{comic.name}" %> <br />
9 <%= image_tag comic.image_strip.url(:thumb) %> <br />
10 <%= "Description: #{comic.description}" %> <br />
11 <% end %>