Skip to content

Instantly share code, notes, and snippets.

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 %>
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 />
//OnClickListener stub
public class ButtonListener implements OnClickListener {
private UpdateUIListener mUIListener;
public ButtonListener(UpdateUIListener uiListener){
mUIListener = uiListener;
}
@Override
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)
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
}
Type listType = new TypeToken<List<JSonModel>>() {}.getType();
List<JsonModel> jsonModels = gson.fromJson(reader, listType);
jsonModel = jsonModels.get(0);
public class RecyclerViewEmptySupport extends RecyclerView {
@Inject ViewFadeAnimator viewFadeAnimator;
private int marginTop;
private View progressView;
private View emptyView;
public RecyclerViewEmptySupport(Context context) {
private void pullRows() {
Elements elements = html.getElementsByTag(ROW_TAG);
elements.remove();
Observable.from(elements)
.flatMap(row -> parseRow(row, CELL_TAG))
.toList()
.subscribe(table::setRows);
}
private void pullRows() {
Elements elements = html.getElementsByTag(ROW_TAG);
ArrayList<ArrayList<String>> rows = new ArrayList<>();
elements.remove();
for (Element element: elements) {
ArrayList<String> row = parseRow(element, CELL_TAG);
rows.add(row);
}
table.setRows(rows);
@Override
public void onBindViewHolder(PageViewHolder holder, int position) {
Page page = getList().get(position);
holder.bind(page);
}