Typecast to correct LayoutParams

Change-Id: Ifdd04923563a0ef57bd281d1b55b8af0e4cc59f0
This commit is contained in:
Hyunyoung Song
2015-05-12 16:27:50 -07:00
parent 1e62c1594a
commit 426b94b207
@@ -25,6 +25,7 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewGroup.MarginLayoutParams;
import android.widget.LinearLayout;
import com.android.launcher3.BubbleTextView;
@@ -164,10 +165,10 @@ public class WidgetsListAdapter extends Adapter<WidgetsRowViewHolder> {
ViewGroup container = (ViewGroup) mLayoutInflater.inflate(
R.layout.widgets_list_row_view, parent, false);
View cellList = container.findViewById(R.id.widgets_cell_list);
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) cellList.getLayoutParams();
LinearLayout cellList = (LinearLayout) container.findViewById(R.id.widgets_cell_list);
MarginLayoutParams lp = (MarginLayoutParams) cellList.getLayoutParams();
lp.setMarginStart(mIndent);
cellList.setLayoutParams(lp);
return new WidgetsRowViewHolder(container);
}