set tablet layout programmatically