Buggy code:
public class DotsActivity extends AppCompatActivity { private static final Lawg lawg = Lawg . newInstance ( DotsActivity . class . getSimpleName ( ) ) ; @ Bind ( id . new_event_input ) ForadayEditText mNewEventInput ; @ Bind ( id . fake_new_event_input ) ForadayEditText mFakeNewEventInput ; @ Bind ( id . new_event_add_button ) View mNewEventAddButton ; @ Bind ( id . events_container ) LinearLayout mEventsContainer ; @ Bind ( id . root_view ) View mRootView ; @ Bind ( id . events_scroll_view ) LockableScrollView mEventsScrollView ; @ Bind ( id . new_event_dot ) View mNewEventDot ; @ Bind ( id . switch_to_blocks ) View mSwitchLayouts ; Day mCurrentDay ; List < Event > mEvents ; private LayoutInflater mLayoutInflater ; private int currentLayout = 0 ; private int [ ] layouts = new int [ ] { layout . item_event_layout , layout . item_event_layout_time_left } ; int [ ] colors = new int [ ] { color . flatui_red_1 , color . flatui_red_2 , color . flatui_orange_1 , color . flatui_orange_2 , color . flatui_yellow_1 , color . flatui_yellow_2 , color . flatui_green_1 , color . flatui_green_2 , color . flatui_blue_1 , color . flatui_blue_2 , color . flatui_purple_1 , color . flatui_purple_2 } ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mLayoutInflater = getLayoutInflater ( ) ; <START_BUG> ViewGroup rootView = ( ( ViewGroup ) ( mLayoutInflater . inflate ( activity_dot , null ) ) ) ; <END_BUG> setContentView ( rootView ) ; ButterKnife . bind ( this ) ; mCurrentDay = getCurrentDay ( ) ; if ( ( mCurrentDay ) == null ) { DotsActivity . lawg . d ( "Current<seq2seq4repair_space>Day<seq2seq4repair_space>not<seq2seq4repair_space>found,<seq2seq4repair_space>creating<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>one" ) ; mCurrentDay = createCurrentDay ( ) ; } initEvents ( ) ; mNewEventDot . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { setNewEventRandomColor ( ) ; } } ) ; setNewEventRandomColor ( ) ; final boolean DEBUG_KEYB_DETECT = false ; mRootView . getViewTreeObserver ( ) . addOnGlobalLayoutListener ( new ViewTreeObserver . OnGlobalLayoutListener ( ) { @ Override public void onGlobalLayout ( ) { int heightDiff = ( mRootView . getRootView ( ) . getHeight ( ) ) - ( mRootView . getHeight ( ) ) ; if ( DEBUG_KEYB_DETECT ) DotsActivity . lawg . d ( ( ( ( "heightDiff:<seq2seq4repair_space>" + heightDiff ) + "<seq2seq4repair_space>dp150:<seq2seq4repair_space>" ) + ( Etils . dpToPx ( 150 ) ) ) ) ; if ( heightDiff > ( Etils . dpToPx ( 150 ) ) ) { mEventsScrollView . fullScroll ( FOCUS_DOWN ) ; if ( DEBUG_KEYB_DETECT ) DotsActivity . lawg . d ( "Setting<seq2seq4repair_space>scrollable<seq2seq4repair_space>false" ) ; mEventsScrollView . setScrollable ( false ) ; } else { if ( DEBUG_KEYB_DETECT ) DotsActivity . lawg . d ( "Setting<seq2seq4repair_space>scrollable<seq2seq4repair_space>true" ) ; mEventsScrollView . setScrollable ( true ) ; } } } ) ; mRootView . setOnTouchListener ( new View . OnTouchListener ( ) { @ Override public boolean onTouch ( View v , MotionEvent event ) { float y = event . getRawY ( ) ; float startY = - 1 ; float currentY = - 1 ; switch ( event . getAction ( ) ) { case MotionEvent . ACTION_DOWN : startY = event . getY ( ) ; break ; case MotionEvent . ACTION_UP : currentY = event . getY ( ) ; float difference = startY - currentY ; break ; case MotionEvent . ACTION_MOVE : break ; } return false ; } } ) ; mSwitchLayouts . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent intent = new Intent ( ) ; intent . setClass ( DotsActivity . this , BlocksActivity . class ) ; startActivity ( intent ) ; } } ) ; mNewEventInput . addTextChangedListener ( mEventInputTextWatcher ) ; mNewEventAddButton . setOnClickListener ( mAddButtonOnClickListener ) ; } TextWatcher mEventInputTextWatcher = new TextWatcher ( ) { @ Override public void beforeTextChanged ( CharSequence s , int start , int count , int after ) { } @ Override public void onTextChanged ( CharSequence s , int start , int before , int count ) { } @ Override public void afterTextChanged ( Editable s ) { } } ; OnClickListener mAddButtonOnClickListener = new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { } } ; public void setNewEventRandomColor ( ) { } @ Nullable public Day getCurrentDay ( ) { } public Day createCurrentDay ( ) { } private void initEvents ( ) { } }

Fix:
ViewGroup rootView = ( ( ViewGroup ) ( mLayoutInflater . inflate ( activity_dots , null ) ) ) ;