Edit AndroidManifest.xml
.
<manifest ...>
<application ...>
<activity
android:name=".view.QuoteMakerXActivity"
android:label="@string/title_activity_quotemakerx"
android:theme="@style/AppTheme.NoActionBar"
android:screenOrientation="portrait">
</application>
</manifest>
Or lock screen programatically.
class QuoteMakerXActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { AndroidInjection.inject(this) super.onCreate(savedInstanceState) setContentView(R.layout.quotemakerx) setSupportActionBar(toolbar) requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT }}