If you've already upgraded your One M8 to Android 5, you have noticed the card view layout when going to the recent apps view. To get back the grid view and change recent apps layout on HTC One M8 running Lollipop, do as follows:
1. Go to the recent apps view (Tap the button right to the home button)
2. Tap the 3dot icon on the top right and head to the Settings.
3. Touch the Layout option and select one of the options: the new Card View or the old Grid View