Skip to content

Commit

Permalink
Fixes part of oppia#59: Build app module library and binary in Bazel (o…
Browse files Browse the repository at this point in the history
…ppia#1622)

* Changed deps to be a parameter, changed targetSDK back to 28 because tests do not pass at 29

* Fixed indentation in utility/BUILD

* Updated comment for utility_test.bzl

* Updated comment for testing_test

* Formatted dependencies and removed unused dependency

* Updated dependency list

* Header for oppia_android_test now fits on one line

* Simplifies comment on domain/BUILD file

* Changed cache_store to persistent_cache_store

* Removed glob() from data BUILD file

* Edited documentation for oppia_android_test

* Updated documentation for utility and testing BUILD files

* Changed src to srcs

* Changed src to srcs

* All dragAndDrop tests now pass, stateRetreiverTest fails

* Created java files for binding adapters

* Translated DrawableDinsingAdapter

* Traslated EditTextBindingAdapter

* Translated ImageViewBindingAdapters

* Translated MarginBindingAdapters

* Translated TextViewBindingAdapters

* Translated RecyclerViewBindingAdapter

* Deleted kotlin binding adapters

* Translated GuidelineBindingAdapter

* Translated StateAssemblerMarginBindingAdapters

* Translated StateAssemblerPaddingBindingAdapters

* Almost finished translating ViewBindingAdapter

* Fixed the duplicate google-services.json issue

* Created Issue and added TODO

* Translated ViewBindingAdapter

* Added minSDK back

* Alphabetized dependencies

* Fixed firebase target

* Trying to fix StateRetreiverTest

* Binding Adapter files are building with Gradle!

* Fixed ktlint violation

* Revert "Deleted kotlin binding adapters"

This reverts commit 84037cb.

* Revert "Translated GuidelineBindingAdapter"

This reverts commit ce92d0a.

* Revert "Translated StateAssemblerMarginBindingAdapters"

This reverts commit 88c9492.

* Revert "Translated StateAssemblerPaddingBindingAdapters"

This reverts commit d66af07.

* Git mv on DrawableBindingAdapters

* Translated DrawableBindingAdapters

* Deleted java files

* Translated EditTextBA and GuidelineBA

* Translated ImageViewBA

* Added missing semicolon

* Translated MarginBindingAdapters

* Translated State AssemblerMarginBA

* Translated StateAssemblerPaddingBA

* Translated TextViewBA

* Revert "Translated TextViewBA"

This reverts commit 849549d.

* Changed targetSdk to 28

* Revert "Revert "Translated TextViewBA""

This reverts commit 6cfa75d.

* Fixed formatting issues and changed NotNull to NonNull

* Refactored GuidelineBindingAdapter to be GuidelineBindingAdapters

* Fixed some double space errors and other typos

* Added missing ViewBindingAdapter

* Deleted extra spaces and fixed more nit issues

* Made all classes final

* Added top level documentation

* Reformatted some comments to fit java style

* Reformatted imports

* Created Issue and added TODOs for re-restricitng access

* Added min and target SDK to domain manifest

* Added documentation comment

* Deleted unused domain_tests library

* Revert "Deleted unused domain_tests library"

This reverts commit 65e71cc.

* Removed unused domain)tests library

* Annotations and helpers library builds

* Listeners library builds

* View models build

* Views now build

* Added documentation comments

* Started removing binding dependencies from views

* Removed fragment imports used only for comments in order to build view files

* Pulled binding dependenvy out of ConceptCardViewModel

* Edited R import statements for Bazel to build

* Fixed more errors, view_model builds

* Worked through more errors

* Added a dependency

* View library builds

* Ordered BUILD file for better merging

* Both databinding adapters and recyclerview adapters are building

* Starting writing databinding resources library

* Removed unused listeners

* Added missing comments

* Formatted files and added missing @nonnull annotations

* Fixed ktlint errors

* Revert "Formatted files and added missing @nonnull annotations"

This reverts commit 84b6125.

* Added genrule for viewmodel files

* Added view genrule

* Both Bazel and Gradle are building

* Fixed ktlint errors

* Delete vcs.xml

* Renamed files, deleted unused files, and added some documentation

* Improved implementation of some functions in ViewBindingShimImpl and added documentation

* Fixed ktlint errors

* Put genrules in a loop, created issue to remove genrules post-gradle and added TODO

* Added more documentation, created an issue to remove shim files, added TODO

* Fixed Gradle build error

* Added documentation, created an issue, added a TODO

* Formatted single line comments

* Fixing more nits

* Fixed more nits.

* Fixed getTimeAgo() function

* Suppressed warning in bindToRecyclerViewAdapter

* Builds in both Bazel and Gradle

* Added comments to BUILD file

* Fixed profile_chooser_profile_view error

* Fixed profile_chooser_add_view

* Fixed walthrough_final_fragment error

* Fixed profile_chooser_fragment error

* Fixed walthrough_activity error

* Fixed onboarding_fragment error

* Fixed audio_fragment error

* Fixed unused presnter errors, databining resources now build

* Builds with Gradle

* Fixed WalkthroughWelcomeFragmentPresenter to not contain unnecessary methods bc of interface

* Removed unnecessary method from WalkthroughActivity

* Removed the need for ProfileChooserListener, added comments to WalkthroughListeners

* Genrule is working

* Simplified genrule

* Alphabetized lists in app module BUILD

* Quick cleanup, added missing documentation

* App library is building with Bazel

* Added Retrofit+Gson dependency for NetworkModule to build with Gradle

* Binary builds

* Started debugging runtime errors

* Fixed domain BUILD

* Added genrule comments, simplified gnerule targets in lists

* Fixed QuestionPlayerFragmentPresenter and StateFragmentPresenter

* Fixed QuestionPlayerViewModel & FRagmentPresenter as well as StateViewModel & FragmentPresenter

* Fixed some nits

* Fixed ktlint errors

* Added assets

* Fixed DragDrop ViewBinding implementations, added modules to TestComponent

* Fix ktlint errors

* Fixed nits in TextViewBA

* Fixed Audio + Language test appearance bug

* Fixed ktlint errors

* Fixed ktlint error in FAQSingleActivityPresenter

* Fixed ktlin errors

* Cleaned up app BUILD file a bit

* Testing module tests now pass, all domain tests pass except StateRetreiver

* Removed unused dependencies, aplhabetized dependencies

* Fixed list formation

* Cleaned up BUILD

* Fixed nits

* Fixing some nits

* Refactored file names

* Altered walkthrough welcome fragment

* Renamed wasProfileEverBeenAddedValue to hasProfileEverBeenAddedValue

* Fixed ktlint error

* Removed unused dependencies and alphabetized them

* Deleted unused methods in ImageViewBA

* Removed data attribute from domain library

* Fixed merge errors

* Fixed nits

* Removed unnecessary field in StateFragmentAccessibilityTest

* Fixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTest

* Injected context in AppVersionViewModel

* Used lambda function to resolve issues with QuestionPlayerVM and QuestionPlayerFragmentPresenter

* Fixed small errors

* Fixed ktlint errors

* Removed Moshi dependency from NetworkModule

* Fixed ktlint error

* Fixing listener file naming

* Fixed NetworkModule issue by removing it from ApplicationComponent temporarily

* Restored NetworkModule, fixed some nits

* Fixed typo, deleted unused file, removed retrofit gradle dependencies

* Fixing nits

* Fixed more nits

* Fixed StateFragmentPresenter and view model, fixed some nits

* Fixed ktlint errors

* Altered for loop to append directly to DATABINDING_ADAPTERS

* Created issue and added TODO for ApplicationComponent and NetworkModule

* Fixed nits

* Fixed ktlint error

* Added documentation, fixed nits

* Added a few nits

* Removed unused imports

* Fixed documentation

* Added comment about binding adapters in Java

* Fixed nits

* Fixed ProfileInputView, ViewBindingShim, StateRetreiver

* Fixed ktlint errors

* Fixed tests to use ApplicationInjector

* Update order of files

Co-authored-by: Ben Henning <[email protected]>

* Update ApplicationInjectorProvider doc comment

Co-authored-by: Ben Henning <[email protected]>

* Add TODO to ViewBindingShimImpl

* Update ApplicationInjector doc comment

Co-authored-by: Ben Henning <[email protected]>

Co-authored-by: Ben Henning <[email protected]>
  • Loading branch information
miaboloix and BenHenning committed Aug 22, 2020
1 parent 69c4484 commit a5b56a7
Show file tree
Hide file tree
Showing 26 changed files with 250 additions and 110 deletions.
16 changes: 16 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# TODO(#1532): Rename file to 'BUILD' post-Gradle.
# TODO(#1640): Move binary manifest to top-level package post-Gradle.
android_binary(
name = "oppia",
custom_package = "org.oppia.app",
enable_data_binding = True,
manifest = "//app:src/main/AndroidManifest.xml",
multidex = "legacy",
manifest_values = {
"applicationId": "org.oppia.app",
"versionCode": "0",
"versionName": "0.1-alpha"
},
deps = [
"//app",
],
)
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ google_services_workspace_dependencies()

git_repository(
name = "circularimageview",
commit = "6098dec76713b34eb8b10883cbe54189ddc08566",
commit = "8a65ba42b3fee21b5e19ca5c8690185f7c60f65d",
remote = "https://github.com/oppia/CircularImageview",
)

Expand Down
73 changes: 72 additions & 1 deletion app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@ Source files for the views library that DO NOT import resources.
Place your file here if:
- It is a view file
- It does not import resources
- It holds a circular dependency with a view (including views in VIEWS_WITH_RESOURCE_IMPORTS)
'''
VIEWS = [
"src/main/java/org/oppia/app/application/ApplicationInjector.kt",
"src/main/java/org/oppia/app/application/ApplicationInjectorProvider.kt",
"src/main/java/org/oppia/app/customview/interaction/FractionInputInteractionView.kt",
"src/main/java/org/oppia/app/customview/interaction/NumericInputInteractionView.kt",
"src/main/java/org/oppia/app/customview/interaction/TextInputInteractionView.kt",
Expand Down Expand Up @@ -370,8 +373,46 @@ in order to keep Gradle building.
sed 's/import org.oppia.app.R/import org.oppia.app.databinding.adapters.R/g' |
sed 's/BindingAdapters {/BindingAdapters_updated {/g' > $(OUTS)
''',
) for file in BINDING_ADAPTERS_WITH_RESOURCE_IMPORTS]

'''
Files to be excluded from the source list for the app library. This list includes all the files
built by the following libraries:
- view_models
- views
- listeners
- annotations
- binding_adapters
'''
EXCLUDED_APP_LIB_FILES = VIEW_MODELS + VIEW_MODELS_WITH_RESOURCE_IMPORTS + VIEWS + VIEWS_WITH_RESOURCE_IMPORTS + BINDING_ADAPTERS + BINDING_ADAPTERS_WITH_RESOURCE_IMPORTS + LISTENERS + ANNOTATIONS

'''
Files to be built by the app library. All of these files are assumed to have resource imports and
will be processed by the app library genrule regardless in order to avoid any import issues.
'''
APP_FILES_WITH_RESOURCE_IMPORTS = glob(["src/main/java/org/oppia/app/**/*.kt"], exclude = EXCLUDED_APP_LIB_FILES)

'''
Genrule that alters both resource import statements and class names for adapter files in order to
account for altered package and file name.
'''
[genrule(
name = "update_" + file[0:-3],
srcs = [file[0:-3] + ".kt"],
outs = [file[0:-3] + "_updated.kt"],
cmd = '''
cat $(SRCS) |
sed 's/import org.oppia.app.R/import org.oppia.app.ui.R/g' |
sed 's/import org.oppia.app.databinding./import org.oppia.app.databinding.databinding./g' > $(OUTS)
''',
)
for file in BINDING_ADAPTERS_WITH_RESOURCE_IMPORTS]
for file in APP_FILES_WITH_RESOURCE_IMPORTS]

# Files to be built by the app library.
APP_FILES = [] + [
"update_" + app_files_with_resource_imports[0:-3]
for app_files_with_resource_imports in APP_FILES_WITH_RESOURCE_IMPORTS
]

# Library for non-layout resource files
android_library(
Expand Down Expand Up @@ -486,6 +527,7 @@ kt_android_library(
visibility = ["//visibility:private"],
)

# TODO(#1639): Translate binding adapters back to Kotlin post-Bazel modularization.
# Library for all custom data-binding adapters under org/oppia/app/databinding
android_library(
name = "binding_adapters",
Expand All @@ -508,6 +550,35 @@ android_library(
visibility = ["//visibility:private"],
)

kt_android_library(
name = "app",
custom_package = "org.oppia.app.ui",
srcs = APP_FILES,
enable_data_binding = 1,
manifest = "src/main/AppAndroidManifest.xml",
deps = [
":binding_adapters",
":dagger",
":databinding_resources",
":resources",
":view_models",
":views",
"//model",
"//utility",
artifact("androidx.databinding:databinding-adapters"),
artifact("androidx.databinding:databinding-common"),
artifact("androidx.databinding:databinding-runtime"),
artifact("androidx.lifecycle:lifecycle-extensions:2.2.0"),
artifact("androidx.lifecycle:lifecycle-livedata-core:2.2.0"),
artifact("androidx.lifecycle:lifecycle-livedata-ktx:2.2.0"),
artifact("androidx.multidex:multidex:2.0.1"),
artifact("androidx.viewpager:viewpager:1.0.0"),
artifact("com.caverock:androidsvg-aar"),
artifact("javax.annotation:javax.annotation-api:jar"),
],
visibility = ["//visibility:public"],
)

# TODO(#1566): Move Firebase rules to their own package & remove default visibility
'''
Package for all Firebase dependencies.
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/AppAndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<manifest xmlns:android="http:https://schemas.android.com/apk/res/android"
package="org.oppia.app.ui">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="28" />
</manifest>
24 changes: 14 additions & 10 deletions app/src/main/java/org/oppia/app/application/ApplicationComponent.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.oppia.app.application

// TODO(#1675): Add NetworkModule once data module is migrated off of Moshi.
import android.app.Application
import dagger.BindsInstance
import dagger.Component
import org.oppia.app.activity.ActivityComponent
import org.oppia.app.shim.IntentFactoryShimModule
import org.oppia.app.shim.ViewBindingShimModule
import org.oppia.data.backends.gae.NetworkModule
import org.oppia.domain.classify.InteractionsModule
import org.oppia.domain.classify.rules.continueinteraction.ContinueModule
import org.oppia.domain.classify.rules.dragAndDropSortInput.DragDropSortInputModule
Expand Down Expand Up @@ -40,20 +40,24 @@ import javax.inject.Singleton
@Singleton
@Component(
modules = [
ApplicationModule::class, DispatcherModule::class, NetworkModule::class, LoggerModule::class,
ContinueModule::class, FractionInputModule::class, ItemSelectionInputModule::class,
MultipleChoiceInputModule::class, NumberWithUnitsRuleModule::class,
NumericInputRuleModule::class, TextInputRuleModule::class, DragDropSortInputModule::class,
InteractionsModule::class, GcsResourceModule::class, GlideImageLoaderModule::class,
ImageParsingModule::class, HtmlParserEntityTypeModule::class, CachingModule::class,
QuestionModule::class, LogReportingModule::class, AccessibilityModule::class,
ImageClickInputModule::class, LogStorageModule::class, IntentFactoryShimModule::class,
ApplicationModule::class, DispatcherModule::class,
LoggerModule::class,
ContinueModule::class, FractionInputModule::class,
ItemSelectionInputModule::class, MultipleChoiceInputModule::class,
NumberWithUnitsRuleModule::class, NumericInputRuleModule::class,
TextInputRuleModule::class, DragDropSortInputModule::class,
InteractionsModule::class, GcsResourceModule::class,
GlideImageLoaderModule::class, ImageParsingModule::class,
HtmlParserEntityTypeModule::class, CachingModule::class,
QuestionModule::class, LogReportingModule::class,
AccessibilityModule::class, ImageClickInputModule::class,
LogStorageModule::class, IntentFactoryShimModule::class,
ViewBindingShimModule::class, PrimeTopicAssetsControllerModule::class,
ExpirationMetaDataRetrieverModule::class
]
)

interface ApplicationComponent {
interface ApplicationComponent : ApplicationInjector {
@Component.Builder
interface Builder {
@BindsInstance
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/java/org/oppia/app/application/ApplicationInjector.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.oppia.app.application

import org.oppia.app.profile.ProfileInputView

/** Injector for application-level dependencies that can't be directly injected where needed. */
interface ApplicationInjector {

// TODO(#1619): Remove post-modularization.
fun inject(profileInputView: ProfileInputView)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.oppia.app.application

/** Provider for [ApplicationInjector]. The application context will implement this interface. */
interface ApplicationInjectorProvider {
fun getApplicationInjector(): ApplicationInjector
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import androidx.multidex.MultiDexApplication
import org.oppia.app.activity.ActivityComponent

/** The root [Application] of the Oppia app. */
class OppiaApplication : MultiDexApplication(), ActivityComponentFactory {
class OppiaApplication :
MultiDexApplication(),
ActivityComponentFactory,
ApplicationInjectorProvider {
/** The root [ApplicationComponent]. */
private val component: ApplicationComponent by lazy {
DaggerApplicationComponent.builder()
Expand All @@ -17,4 +20,6 @@ class OppiaApplication : MultiDexApplication(), ActivityComponentFactory {
override fun createActivityComponent(activity: AppCompatActivity): ActivityComponent {
return component.getActivityComponentBuilderProvider().get().setActivity(activity).build()
}

override fun getApplicationInjector(): ApplicationInjector = component
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package org.oppia.app.help.faq.faqsingle

import android.os.Build
import android.text.Html
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import androidx.databinding.DataBindingUtil
import kotlinx.android.synthetic.main.faq_single_activity.*
import org.oppia.app.R
import org.oppia.app.activity.ActivityScope
import org.oppia.app.databinding.FaqSingleActivityBinding
Expand Down Expand Up @@ -36,8 +36,10 @@ class FAQSingleActivityPresenter @Inject constructor(
binding.faqSingleActivityToolbar.setNavigationOnClickListener {
(activity as FAQSingleActivity).finish()
}
activity.faq_question_text_view.text = question
activity.faq_answer_text_view.text = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
activity.findViewById<TextView>(R.id.faq_question_text_view).text = question
activity.findViewById<TextView>(R.id.faq_answer_text_view).text = if (
Build.VERSION.SDK_INT >= Build.VERSION_CODES.N
) {
Html.fromHtml(answer, Html.FROM_HTML_MODE_COMPACT)
} else {
Html.fromHtml(answer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ interface OnboardingNavigationListener {
/** Skips onboarding slide. */
fun clickOnSkip()

/** Moves user to next onboarding slide. */
/** Moves the user to the next onboarding slide. */
fun clickOnNext()
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.oppia.app.options
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
import androidx.databinding.library.baseAdapters.BR
import androidx.recyclerview.widget.RecyclerView
import org.oppia.app.R
import org.oppia.app.databinding.LanguageItemsBinding
Expand Down Expand Up @@ -56,7 +55,7 @@ class LanguageSelectionAdapter(
inner class LanguageViewHolder(val binding: LanguageItemsBinding) :
RecyclerView.ViewHolder(binding.root) {
internal fun bind(language: String, position: Int) {
binding.setVariable(BR.languageString, language)
binding.languageString = language
binding.languageRadioButton.isChecked = position == selectedPosition
binding.radioContainer.setOnClickListener {
if (prefKey == APP_LANGUAGE || prefKey == AUDIO_LANGUAGE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class ProfileChooserFragmentPresenter @Inject constructor(
}
logProfileChooserEvent()
binding.profileRecyclerView.isNestedScrollingEnabled = false
binding.hasProfileEverBeenAddedValue = hasProfileEverBeenAddedValue
subscribeToWasProfileEverBeenAdded()
binding.profileRecyclerView.apply {
adapter = createRecyclerViewAdapter()
Expand Down Expand Up @@ -203,6 +204,7 @@ class ProfileChooserFragmentPresenter @Inject constructor(
binding: ProfileChooserAddViewBinding,
@Suppress("UNUSED_PARAMETER") model: ProfileChooserUiModel
) {
binding.hasProfileEverBeenAddedValue = hasProfileEverBeenAddedValue
binding.addProfileItem.setOnClickListener {
if (chooserViewModel.adminPin.isEmpty()) {
activity.startActivity(
Expand Down
34 changes: 11 additions & 23 deletions app/src/main/java/org/oppia/app/profile/ProfileInputView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import android.widget.EditText
import android.widget.LinearLayout
import android.widget.TextView
import androidx.databinding.BindingAdapter
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import org.oppia.app.R
import org.oppia.app.application.ApplicationInjectorProvider
import org.oppia.app.shim.ViewBindingShim
import org.oppia.app.shim.ViewComponentFactory
import javax.inject.Inject

/** Custom view that is used for name or pin input with error messages. */
Expand All @@ -27,12 +25,6 @@ class ProfileInputView @JvmOverloads constructor(
@Inject
lateinit var bindingInterface: ViewBindingShim

override fun onAttachedToWindow() {
super.onAttachedToWindow()
(FragmentManager.findFragment<Fragment>(this) as ViewComponentFactory)
.createViewComponent(this).inject(this)
}

companion object {
@JvmStatic
@BindingAdapter("profile:label")
Expand All @@ -52,23 +44,19 @@ class ProfileInputView @JvmOverloads constructor(
private var input: EditText

init {
val attributes = context.obtainStyledAttributes(attrs, R.styleable.ProfileInputView)
label = bindingInterface.provideProfileInputViewBindingLabelText(
(context.applicationContext as ApplicationInjectorProvider).getApplicationInjector()
.inject(this)

val profileInputView = bindingInterface.inflateProfileInputView(
LayoutInflater.from(context),
this,
true
parent = this,
attachToParent = true
)
val attributes = context.obtainStyledAttributes(attrs, R.styleable.ProfileInputView)
label = bindingInterface.provideProfileInputViewBindingLabelText(profileInputView)
label.text = attributes.getString(R.styleable.ProfileInputView_label)
input = bindingInterface.provideProfileInputViewBindingInput(
LayoutInflater.from(context),
this,
true
)
errorText = bindingInterface.provideProfileInputViewBindingErrorText(
LayoutInflater.from(context),
this,
true
)
input = bindingInterface.provideProfileInputViewBindingInput(profileInputView)
errorText = bindingInterface.provideProfileInputViewBindingErrorText(profileInputView)
orientation = VERTICAL
if (
attributes.getBoolean(
Expand Down
27 changes: 11 additions & 16 deletions app/src/main/java/org/oppia/app/shim/ViewBindingShim.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,26 @@ import org.oppia.util.parser.HtmlParser
// TODO(#1619): Remove file post-Gradle
interface ViewBindingShim {

/**
* Handles binding inflation for [ProfileInputView] and returns the binding's label text.
*/
fun provideProfileInputViewBindingLabelText(
/** Handles binding inflation for [ProfileInputView] */
fun inflateProfileInputView(
inflater: LayoutInflater,
parent: ViewGroup,
attachToParent: Boolean
): View

/** Returns [ProfileInputView] binding's label text. */
fun provideProfileInputViewBindingLabelText(
profileInputView: View
): TextView

/**
* Handles binding inflation for [ProfileInputView] and returns the binding's input.
*/
/** Returns [ProfileInputView] binding's input. */
fun provideProfileInputViewBindingInput(
inflater: LayoutInflater,
parent: ViewGroup,
attachToParent: Boolean
profileInputView: View
): EditText

/**
* Handles binding inflation for [ProfileInputView] and returns the binding's error text.
*/
/** Returns [ProfileInputView] binding's error text. */
fun provideProfileInputViewBindingErrorText(
inflater: LayoutInflater,
parent: ViewGroup,
attachToParent: Boolean
profileInputView: View
): TextView

/**
Expand Down
Loading

0 comments on commit a5b56a7

Please sign in to comment.