2019-01-09 23:22:58 +01:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2018-12-07 21:11:50 +01:00
|
|
|
package org.mozilla.fenix
|
|
|
|
|
2019-01-19 00:33:40 +01:00
|
|
|
import android.content.Context
|
2018-12-07 21:11:50 +01:00
|
|
|
import android.os.Bundle
|
2019-01-19 00:33:40 +01:00
|
|
|
import android.util.AttributeSet
|
|
|
|
import android.view.View
|
2019-01-07 22:47:47 +01:00
|
|
|
import androidx.appcompat.app.AppCompatActivity
|
2019-01-19 00:33:40 +01:00
|
|
|
import mozilla.components.concept.engine.EngineView
|
2019-01-23 22:39:53 +01:00
|
|
|
import org.mozilla.fenix.ext.components
|
2018-12-07 21:11:50 +01:00
|
|
|
|
|
|
|
class HomeActivity : AppCompatActivity() {
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
|
super.onCreate(savedInstanceState)
|
|
|
|
setContentView(R.layout.activity_home)
|
|
|
|
}
|
2019-01-19 00:33:40 +01:00
|
|
|
|
2019-01-31 20:33:56 +01:00
|
|
|
override fun onCreateView(
|
|
|
|
parent: View?,
|
|
|
|
name: String,
|
|
|
|
context: Context,
|
|
|
|
attrs: AttributeSet
|
|
|
|
): View? =
|
2019-01-19 00:33:40 +01:00
|
|
|
when (name) {
|
2019-01-31 20:33:56 +01:00
|
|
|
EngineView::class.java.name -> components.core.engine.createView(
|
|
|
|
context,
|
|
|
|
attrs
|
|
|
|
).asView()
|
2019-01-19 00:33:40 +01:00
|
|
|
else -> super.onCreateView(parent, name, context, attrs)
|
|
|
|
}
|
2018-12-07 21:11:50 +01:00
|
|
|
}
|