All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mle.android.ui.fragments.DefaultFragment.scala Maven / Gradle / Ivy

The newest version!
package com.mle.android.ui.fragments

import android.view.{View, ViewGroup, LayoutInflater}
import android.os.Bundle

/**
 *
 * @author mle
 */
trait DefaultFragment extends BaseFragment {
  def layoutId: Int

  override def onCreateView(inflater: LayoutInflater, container: ViewGroup, savedInstanceState: Bundle): View =
    inflater.inflate(layoutId, container, false)

  override def onActivityCreated(savedInstanceState: Bundle): Unit = {
    super.onActivityCreated(savedInstanceState)
    initViews(Option(savedInstanceState))
  }

  /**
   * Called when the [[android.app.Activity]] this fragment belongs to has been created.
   *
   * @param savedInstanceState  state
   */
  def initViews(savedInstanceState: Option[Bundle]): Unit = {}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy