A modular functional UI language for Android

Overview

Macroid — a Scala GUI DSL for Android

Build Status Codacy Badge Android Arsenal Join the chat at https://gitter.im/macroid/macroid

Macroid is a modular functional user interface creation language for Android, implemented with Scala macros.

Striving to be focused on one thing (GUI), Macroid promotes composability and high-level abstractions.

Prerequisites: Scala 2.10.x or 2.11.x, Android API 19+.

Latest version: 2.1.0

Snapshot version: 2.1.0-SNAPSHOT

License: MIT.

For more info head to http://47deg.github.io/macroid!

Installation

libraryDependencies ++= Seq(
  aar("org.macroid" %% "macroid" % "2.1.0")

If you want to use the SNAPSHOT version you need to add the Sonatype SNAPSHOT repo

resolvers +=
  "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

libraryDependencies ++= Seq(
  aar("org.macroid" %% "macroid" % "2.1.0-SNAPSHOT")

Contributing

All contributions are welcome (and encouraged)!

Commit messages

Macroid’s commit message structure is inspired by the Spray project. The message has the following format:

[=|+|!] [core|viewable|akka|docs|all]: <Actual message>.
  • = means there are no API changes
  • + means added functionality
  • ! means breaking changes (source or binary)

Example:

! core: Receive UI actions in mapUi & co (fix #48)

mapUi, flatMapUi, ... now operate on UI actions, rather than simple thunks.
For example, the new type signature for mapUi is (A ⇒ Ui[B]) ⇒ Future[B].

Following this convention greatly simplifies writing the changelogs.

Documentation

Although this is not crucial, updating the docs under macroid-docs together with the code changes might save some time in the future, and thus is highly appreciated. It can be done in the same commit.

Commercial Support

47 Degrees offers commercial support for the Macroid library and associated technologies. To find out more, visit 47 Degrees' Open Source Support.

Comments
  • gen-idea fails with AAR

    gen-idea fails with AAR

    When I run gen-idea, I get:

    [FAILED     ] org.macroid#macroid_2.11;2.0.0-M3!macroid_2.11.jar:  (0ms)
    ...
    [warn] ==== jcenter: tried
    [warn]   http://jcenter.bintray.com/org/macroid/macroid_2.11/2.0.0-M3/macroid_2.11-2.0.0-M3.jar
    

    Is this because sbt-idea is looking for a .jar instead of a .aar? How do I get it working? I know this isn't really a Macroid issue but I figured you would know a workaround.

    opened by emptyarray 11
  • Support library dependencies

    Support library dependencies

    (This is not an issue, but more like a comment and feedback) Maybe using support libraries is the recommended way to reach more devices. But requiring your users to stick with android.support.v4.Fragment when you can use a newer API (this is my case) seems a little bit restrictive.

    opened by oscarvarto 10
  • Adding bricks in subclasses/subtraits

    Adding bricks in subclasses/subtraits

    I have a base trait for my views in which I call setContentView to set a layout. Then I have several subtraits that extend from the base trait in order to add certain layout elements.

    Base trait

    trait View[V <: IView, M <: AbstractViewModel[V]]
            extends ViewModelBaseActivity[V, M]
            with Contexts[Activity] { self: V ⇒
        def layout: Ui[android.view.ViewGroup]
    
        def onCreateView( state: Bundle ): Unit
    
        override def onCreate( state: Bundle ) = {
            super.onCreate( state )
    
            onCreateView( state )
    
            setContentView {
                getUi{
                    layout
                }
            }
    
            setModelView( self )
        }
    }
    

    Subtrait:

    trait Coordinator[V <: IView, M <: AbstractViewModel[V]]
            extends View[V, M]
            with Contexts[Activity] { self: V ⇒
        val coordinator = l[CoordinatorLayout]()
    
        override def onCreateView( state: Bundle ) = {
            coordinator <~ addViews(
                Seq(
                    w[TextView] <~ text( "test" )
                )
            )
        }
    
        override val layout = coordinator
    }
    

    However when I create a new view which extends the Coordinator subtrait, there is no TextView displaying "test". It works when I do the layout manipulation directly in the base trait.

    opened by tymm 9
  • = all: migrate macros to macro-compat

    = all: migrate macros to macro-compat

    Added scalac flags that revealed many warnings. Migrated macros to macro-compat to deal with many of them. Configured tests using roboelectric and added simple test for Bundles.

    opened by joprice 9
  • Missing link between Future and UI?

    Missing link between Future and UI?

    I've been tinkering with type signatures for quite some time, and can't find a way to write this without relying on runUi (which if Ui is analogous to IO in Haskell, we should treat runUi as something to be avoided, same as unsafePerformIO in Haskell).

    The specific use case is this: When the user clicks a button, we submit a form to a server, and depending on the result will either display a toast, or go to the next screen. The signatures are roughly:

    def submitForm: Future[String \/ ResponseData] = {
      // form submission code irrelevant
    }
    
    def handleResponse(response: String \/ ResponseData): Ui[Unit] =
      response.map(goToNextScreen).valueOr(displayError)
    
    def goToNextScreen(data: ResponseData): Ui[Unit] = Ui {
      // create intent and pass data as extras, details irrelevant
    }
    
    def displayError(message: String): Ui[Unit] =
      toast(message) <~ fry
    

    Now ultimately On.click needs a Ui[Any], but given any asynchronous action, I have no way to convert from a Ui[Future[Ui[A]]] to a Ui[Future[A]]. The simplest solution would seem to be adding a method to Ui of a type that looks something like:

    def ~~>[B, C](next: C => Ui[B])(implicit ev: A <:< Future[C]): Ui[Future[B]]
    

    Which would let me write my code as

    w[Button] <~ On.click(Ui(submitForm) ~~> handleResponse _)
    

    For the record, my code is currently

    Ui {
      submitForm().flatMapUi(handleResponse _ >>> runUi[Unit])
    }
    
    opened by sgrif 9
  • Can’t find the right LayoutParams?

    Can’t find the right LayoutParams?

    I can't seem to get Macroid to find the right LayoutParams constructor with Macroid 2.0.0-20140401 (trimmed version, I have other elements in this layout):

    l[HorizontalLinearLayout] (
      w[Button] <~ text("Start") <~ wire(startButton) <~
        lp(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, 1.0f) <~
        On.click(Ui(start()))
     )
    

    Compilation fails with:

    [error] XXX.scala:110: Could not find the appropriate LayoutParams constructor
    [error]           w[Button] <~ text("Start") <~ wire(startButton) <~ lp(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, 1.0f) <~ On.click(Ui(start())),
    [error]                                                                ^
    

    Maybe I'm not using it correctly, as the documentation and the starter are for 1.x.

    opened by samueltardieu 8
  • Multiple Event Listener Tweaks

    Multiple Event Listener Tweaks

    This PR brings the ability to override the different handlers in the Android Listeners with several overrides (for instance: OnSeekBarChangeListener).

    If this contribution looks good to you, in a potential next PR, we would propose replace the current On implementation for the equivalent UnitOn proposed here, and FuncOn for UnitFuncOn, even both could be named On and FuncOn. That means the UnitOn is equivalent to the current On, and in the other hand, UnitFuncOn is equivalent to FuncOn.

    From 47Deg, we wish this contribution will be useful.

    Please, @stanch , Could you review? Thanks!

    opened by juanpedromoreno 7
  • Going through library sources within IDE

    Going through library sources within IDE

    Trying to go through library sources to see how it works in Idea gives me this sad screen: image

    It would be nice to publish sources + javadoc, if it wasn't before, or am I missing something obvious here?

    opened by dant3 7
  • enhancement: logX should not be a string interpolator

    enhancement: logX should not be a string interpolator

    it removes room for one to use other string interpolators, e.g. for formatting (f)

    also, logX doesn't do anything special other than insert the variables. no reason to use string interp. and it looks ugly

    logV"foo"() ? yuck :(

    logV(f"$interp%02d") that's pretty reasonable (all other implicits for logtag, etc. are ok)

    opened by pfn 7
  • java.lang.NoSuchMethodError: macroid.viewable.Listable.listAdapter

    java.lang.NoSuchMethodError: macroid.viewable.Listable.listAdapter

    Hello, I'm playing with the macroid-starter sample project and trying to add a sample ListView. The code compiles properly but I get a runtime error:

    03-18 21:33:14.956    9578-9578/com.example.macroid.starter E/AndroidRuntime﹕ FATAL EXCEPTION: main
        java.lang.NoSuchMethodError: macroid.viewable.Listable.listAdapter
                at com.example.macroid.starter.MainActivity.onCreate(MainActivity.scala:45)    
    

    The error is triggered by the last line of the code provided below:

    package com.example.macroid.starter
    // ...
    // import macroid stuff
    import macroid._
    import macroid.FullDsl._
    import macroid.contrib._
    import macroid.viewable._
    import scala.concurrent.ExecutionContext.Implicits.global
    // ...
    // mix in Contexts for Activity
    class MainActivity extends Activity with Styles with Contexts[Activity] {
      // prepare a variable to hold our text view
      var cap = slot[TextView]
    
      override def onCreate(savedInstanceState: Bundle) = {
        super.onCreate(savedInstanceState)
    
        var textListable: Listable[String, TextView] = Listable.text {
          TextTweaks.large
        }
        var adapt = textListable.listAdapter( Seq("one", "two") )
    

    I tried to disable proguard and I believe it's not triggered, but I got no improvement. Not sure if I'm doing something wrong or there's a bug in macroid (I noticed macroid-viewable was moved in the core project 10 days ago).

    Any clue?

    opened by tacone 6
  • Build file needs to be corrected and updated

    Build file needs to be corrected and updated

    Android local m2repository

    This line fails both on Mac OS X 10.9.2 and Windows 8.1 with cygwin (https://github.com/macroid/macroid/blob/v2/build.sbt#L18)

    "Google Repository" at (new File(System.getenv("ANDROID_SDK_HOME")) / "extras" / "google" / "m2repository").getAbsolutePath
    

    It is working in both Mac OS X and Windows with:

    "Android Repository" at (new File(System.getenv("ANDROID_SDK_HOME")) / "extras" / "android" / "m2repository").getCanonicalFile.toURI.toString
    

    When was the last time you updated your local Android SDK installation with $ android? (I need "extras" / "android" / "m2repository" instead of "extras" / "google" / "m2repository")

    scalaz-core dependency

    I think your code ultimately depends on "org.scalaz" % "scalaz-core_2.10" % "7.0.3" Is it possible to update to a more recent version scalaz-core? (What about 7.0.5 or even 7.1.0-M5?)

    opened by oscarvarto 6
  • SBT cannot find version 2.1.0

    SBT cannot find version 2.1.0

    Apparently version 2.1.0 is not published anywhere. I was not able to find it, at least.

    [info] Resolving org.macroid#macroid-viewable_2.11;2.1.0 ...
    [warn]  module not found: org.macroid#macroid-viewable_2.11;2.1.0
    [warn] ==== local: tried
    [warn]   /home/rgomes/.ivy2/local/org.macroid/macroid-viewable_2.11/2.1.0/ivys/ivy.xml
    [warn] ==== public: tried
    [warn]   https://repo1.maven.org/maven2/org/macroid/macroid-viewable_2.11/2.1.0/macroid-viewable_2.11-2.1.0.pom
    [warn] ==== local-preloaded-ivy: tried
    [warn]   /home/rgomes/.sbt/preloaded/org.macroid/macroid-viewable_2.11/2.1.0/ivys/ivy.xml
    [warn] ==== local-preloaded: tried
    [warn]   file:////home/rgomes/.sbt/preloaded/org/macroid/macroid-viewable_2.11/2.1.0/macroid-viewable_2.11-2.1.0.pom
    [warn] ==== google libraries: tried
    [warn]   file:/home/rgomes/tools/sdk-tools-linux-4333796/extras/google/m2repository/org/macroid/macroid-viewable_2.11/2.1.0/macroid-viewable_2.11-2.1.0.pom
    [warn] ==== android libraries: tried
    [warn]   file:/home/rgomes/tools/sdk-tools-linux-4333796/extras/android/m2repository/org/macroid/macroid-viewable_2.11/2.1.0/macroid-viewable_2.11-2.1.0.pom
    [warn] ==== sonatype-releases: tried
    [warn]   https://oss.sonatype.org/content/repositories/releases/org/macroid/macroid-viewable_2.11/2.1.0/macroid-viewable_2.11-2.1.0.pom
    [warn] ==== jcenter: tried
    [warn]   http://jcenter.bintray.com/org/macroid/macroid-viewable_2.11/2.1.0/macroid-viewable_2.11-2.1.0.pom
    [warn] ==== Sonatype OSS Releasess: tried
    [warn]   https://oss.sonatype.org/content/repositories/releases/org/macroid/macroid-viewable_2.11/2.1.0/macroid-viewable_2.11-2.1.0.pom
    [info] Resolving jline#jline;2.14.3 ...
    [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
    [warn]  ::          UNRESOLVED DEPENDENCIES         ::
    [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
    [warn]  :: org.macroid#macroid_2.11;2.1.0: not found
    [warn]  :: org.macroid#macroid-viewable_2.11;2.1.0: not found
    [warn]  ::::::::::::::::::::::::::::::::::::::::::::::
    

    This is my build.sbt:

    import android.Keys._
    import android.Dependencies.{LibraryDependency, aar}
    
    enablePlugins(AndroidApp)
    
    platformTarget in Android := "android-22"
    
    name := "example"
    
    scalaVersion := "2.11.12"
    
    resolvers ++= Seq(
      Resolver.sonatypeRepo("releases"),
      "jcenter" at "http://jcenter.bintray.com",
      "Sonatype OSS Releasess" at "https://oss.sonatype.org/content/repositories/releases"
    )
    
    javacOptions ++= Seq("-source", "1.7", "-target", "1.7")
    scalacOptions ++= Seq("-feature", "-deprecation", "-target:jvm-1.7")
    
    libraryDependencies ++= Seq(
      aar("org.macroid" %% "macroid" % "2.1.0"),
      aar("org.macroid" %% "macroid-viewable" % "2.1.0"),
      aar("com.android.support" % "support-v4" % "24.0.0")
    )
    
    proguardScala in Android := true
    
    proguardOptions in Android ++= Seq(
      "-ignorewarnings",
      "-keep class scala.Dynamic"
    )
    
    opened by frgomes 0
  • proguard issue with 2.0

    proguard issue with 2.0

    Adding macroid 2.0 to a fresh project created with sbt-android 1.7.10 gen-android yields the following proguard issues. How does one fix them? Shouldn't there be somewhere a list with proguard options that need to be enabled for macroid to work?

    [info] Collecting resources
    [info] Performing full resource merge
    [info] QueuedCruncher is using /opt/android-sdk/build-tools/27.0.2/aapt
    [info] Processing resources
    [info] QueuedCruncher is using /opt/android-sdk/build-tools/27.0.2/aapt
    [info] Rebuilding all classes because R.java has changed
    [info] Regenerating TR.scala because R.java has changed
    [info] Formatting 1 Scala source in foo:compile ...
    [info] Compiling 4 Scala sources and 3 Java sources to /home/wookietreiber/projects/apps/foo/target/scala-2.11/classes...
    [info] Packaging /home/wookietreiber/projects/apps/foo/target/android/intermediates/classes.jar ...
    [info] Packaging resources: resources-debug.ap_
    [info] QueuedCruncher is using /opt/android-sdk/build-tools/27.0.2/aapt
    [info] Done packaging.
    [info] Finding dependency references for: com.android.support:support-core-ui:25.0.1
    [info] Finding dependency references for: com.android.support:support-v4:25.0.1
    [info] Finding dependency references for: com.android.support:support-compat:25.0.1
    [info] Finding dependency references for: com.android.support:support-vector-drawable:24.0.0
    [info] Finding dependency references for: com.android.support:animated-vector-drawable:24.0.0
    [info] Finding dependency references for: org.macroid:macroid_2.11:2.0
    [info] Finding dependency references for: com.android.support:appcompat-v7:24.0.0
    [info] Finding dependency references for: com.android.support:support-core-utils:25.0.1
    [info] Finding dependency references for: com.android.support:support-fragment:25.0.1
    [info] Finding dependency references for: com.android.support:support-media-compat:25.0.1
    [info] Finding dependency references for: com.android.support:support-core-ui:25.0.1
    [info] Finding dependency references for: com.android.support:support-compat:25.0.1
    [info] Finding dependency references for: com.android.support:support-core-utils:25.0.1
    [info] Finding dependency references for: com.android.support:support-fragment:25.0.1
    [info] Finding dependency references for: com.android.support:support-media-compat:25.0.1
    [info] Finding dependency references for: org.typelevel:macro-compat_2.11:1.1.1:default (artifactId=macro-compat_2.11, project.packaging=jar.asc, project.version=1.1.1, pom.groupId=org.typelevel, groupId=org.typelevel, project.groupId=org.
    typelevel, version=1.1.1, pom.version=1.1.1, project.artifactId=macro-compat_2.11, pom.artifactId=macro-compat_2.11)
    [info] Finding dependency references for: com.android.support:support-annotations:25.0.1:default (artifactId=support-annotations, project.packaging=pom.md5, project.version=25.0.1, pom.groupId=com.android.support, groupId=com.android.suppo
    rt, project.groupId=com.android.support, version=25.0.1, pom.version=25.0.1, project.artifactId=support-annotations, pom.artifactId=support-annotations)
    [info] Finding dependency references for: classes.jar
    ProGuard, version 5.0
    ProGuard is released under the GNU General Public License. You therefore
    must ensure that programs that link to it (android, ...)
    carry the GNU General Public License as well. Alternatively, you can
    apply for an exception with the author of ProGuard.
    Reading input...
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-core-ui-25.0.1/classes.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-v4-25.0.1/classes.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-compat-25.0.1/classes.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-vector-drawable-24.0.0/classes.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-animated-vector-drawable-24.0.0/classes.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/org.macroid-macroid_2.11-2.0/classes.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-appcompat-v7-24.0.0/classes.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-core-utils-25.0.1/classes.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-fragment-25.0.1/classes.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-media-compat-25.0.1/classes.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-core-ui-25.0.1/libs/internal_impl-25.0.1.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-compat-25.0.1/libs/internal_impl-25.0.1.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-core-utils-25.0.1/libs/internal_impl-25.0.1.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-fragment-25.0.1/libs/internal_impl-25.0.1.jar] (filtered)
    Reading program jar [/home/wookietreiber/.android/sbt/exploded-aars/com.android.support-support-media-compat-25.0.1/libs/internal_impl-25.0.1.jar] (filtered)
    Reading program jar [/home/wookietreiber/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.11/1.0.5/scala-xml_2.11-1.0.5.jar] (filtered)
    Reading program jar [/home/wookietreiber/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.11.12/scala-compiler-2.11.12.jar] (filtered)
    Reading program jar [/home/wookietreiber/.cache/coursier/v1/https/repo1.maven.org/maven2/org/typelevel/macro-compat_2.11/1.1.1/macro-compat_2.11-1.1.1.jar] (filtered)
    Reading program jar [/home/wookietreiber/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-async_2.11/0.9.5/scala-async_2.11-0.9.5.jar] (filtered)
    Reading program jar [/opt/android-sdk/extras/android/m2repository/com/android/support/support-annotations/25.0.1/support-annotations-25.0.1.jar] (filtered)
    Reading program jar [/home/wookietreiber/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.4/scala-parser-combinators_2.11-1.0.4.jar] (filtered)
    Reading program jar [/home/wookietreiber/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.11.12/scala-reflect-2.11.12.jar] (filtered)
    Reading program jar [/home/wookietreiber/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.12/scala-library-2.11.12.jar] (filtered)
    Reading program jar [/home/wookietreiber/projects/apps/foo/target/android/intermediates/classes.jar] (filtered)
    Reading library jar [/opt/android-sdk/platforms/android-27/android.jar]
    Initializing...
    Note: scala.tools.nsc.typechecker.TypeStrings$class calls 'Class.getEnclosingClass'
    Warning: scala.async.internal.AsyncTransform$$typecreator3$1: can't find enclosing method 'scala.reflect.api.Trees$TreeApi startStateMachine$1(scala.async.internal.AsyncMacro,scala.reflect.api.TypeTags$WeakTypeTag,scala.reflect.api.Trees$ClassDefApi,scala.async.internal.ExprBuilder$AsyncBlock,scala.collection.immutable.List)' in program class scala.async.internal.AsyncTransform
    Warning: scala.async.internal.LiveVariables$FindUseTraverser$1: can't find enclosing method 'scala.async.internal.LiveVariables$ReferencedFields$3 fieldsUsedIn$1(scala.async.internal.AsyncMacro,scala.async.internal.ExprBuilder$AsyncState,scala.collection.immutable.Set,scala.runtime.VolatileObjectRef)' in program class scala.async.internal.LiveVariables
    Note: scala.tools.jline_embedded.OSvTerminal: can't find dynamically referenced class com.cloudius.util.Stty
    Note: scala.tools.jline_embedded.console.ConsoleReader: can't find dynamically referenced class sun.misc.Signal
    Note: scala.tools.jline_embedded.console.ConsoleReader: can't find dynamically referenced class sun.misc.SignalHandler
    Note: scala.tools.jline_embedded.internal.TerminalLineSettings accesses a field 'INHERIT' dynamically
          Maybe this is library field 'android.util.LayoutDirection { int INHERIT; }'
          Maybe this is library field 'java.lang.ProcessBuilder$Redirect { java.lang.ProcessBuilder$Redirect INHERIT; }'
          Maybe this is library field 'java.lang.ProcessBuilder$Redirect$Type { java.lang.ProcessBuilder$Redirect$Type INHERIT; }'
    Note: there were 1 classes trying to access enclosing classes using reflection.
          You should consider keeping the inner classes attributes
          (using '-keepattributes InnerClasses').
          (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes)
    Note: there were 3 unresolved dynamic references to classes or interfaces.
          You should check if you need to specify additional program jars.
          (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
    Note: there were 1 accesses to class members by means of introspection.
          You should consider explicitly keeping the mentioned class members
          (using '-keep' or '-keepclassmembers').
          (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember)
    Warning: there were 2 unresolved references to program class members.
             Your input classes appear to be inconsistent.
             You may need to recompile the code.
             (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember
    
    opened by wookietreiber 0
  • How to manipulate ListView Adapter from the SlottedListable

    How to manipulate ListView Adapter from the SlottedListable

    We need to remove an element from the list adapter via onClick for a button that is a widget inside the row. Banging my head around different options but none is working. Ideally we should access a ListView and get adapter from it to remove item from it and trigger notification to the ListView that data is changed. But the problem is that we can't access ListView from within the Object that is inherited from SlottedListable

    opened by asabadyr 0
  • Getting WartRemover back

    Getting WartRemover back

    It might be useful to adapt the old Wart’s code to the new WartRemover release. I’ve just lost ~15 minutes because the compiler did not catch discarding Ui in a Ui… :smiley:

    opened by michalrus 0
  • Composing Tweaks

    Composing Tweaks

    Something like that should be possible:

    Tweak[SomeView](v ⇒
      v.subView1 <~ someTweak ~
      v.subView2 <~ someOtherTweak
    )
    

    … without any notion of Ui.

    Currently, we have to do:

    Tweak[SomeView](v ⇒
      (
        v.subView1 <~ someTweak ~
        v.subView2 <~ someOtherTweak
      ).get
    )
    
    opened by michalrus 2
  • `CheckBox` listeners

    `CheckBox` listeners

    For some reason a listener for CheckBox is named OnCheckedChangeListerer, while its method is onCheckedChanged—mind the last letter. :disappointed:

    Perhaps, an exception should be added to EventTweakMacros for this particular case.

    opened by michalrus 2
Releases(v.2.0)
Owner
47 Degrees Open Source
47 Degrees Open Source Initiatives
47 Degrees Open Source
An Interpreter/Transpiler for the Folders esoteric programming language, a language with no code and just folders

Folders2kt ?? An Interpreter/Transpiler of the Folders esoteric programming language, a language with no code and just folders, written in Kotlin Show

Jens Klingenberg 18 Jan 4, 2023
Muhammad Valian Masdani 2 Jul 5, 2022
Showcase project of Functional Reactive Programming on Android, using RxJava.

FunctionalAndroidReference FunctionalAndroidReference is a showcase project of Functional Reactive Programming on Android, using RxJava. It's a compan

Paco 278 Nov 18, 2022
Sample Ktor app using a functional stack

samstack This is a template project you can clone and use as a basis for your own Kotlin based microservices. This application structure is my persona

Sam 6 Nov 16, 2022
Sample Ktor app using a functional stack

samstack This is a template project you can clone and use as a basis for your own Kotlin based microservices. This application structure is my persona

Sam 18 Jul 21, 2022
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

Madalin Valceleanu 2.3k Dec 30, 2022
Modular Android architecture which showcase Kotlin, MVVM, Navigation, Hilt, Coroutines, Jetpack compose, Retrofit, Unit test and Kotlin Gradle DSL.

SampleCompose Modular Android architecture which showcase Kotlin, MVVM, Navigation, Hilt, Coroutines, Jetpack compose, Retrofit, Unit test and Kotlin

Mohammadali Rezaei 7 Nov 28, 2022
FunFacts is an example of Modular architecture

FunFacts FunFacts is an example of Modular architecture This Project is built using Kotlin,we will use in this App : Modular architecture Dependency I

Sachin Rajput 48 Jan 1, 2023
A modular framework for building Discord bots in Kotlin using Kordex and Kord

Mik Bot A modular framework for building Discord bots in Kotlin using Kordex and Kord **If you are here for mikmusic, click here and there Deployment

Michael Rittmeister 31 Dec 24, 2022
Programación - 02 Programación Estructurada y Modular. 1DAM. Curso 2022-2023

Programación - 02 Programación Estructurada y Modular Tema 02 Programación Estructurada y Modular. 1DAM. Curso 2022/2023. Programación - 02 Programaci

José Luis González Sánchez 31 Dec 29, 2022
A showcase music app for Android entirely written using Kotlin language

Bandhook Kotlin This project is a small replica of the app I developed some time ago. Bandhook can still be found on Play Store At the moment it will

Antonio Leiva 1.9k Dec 23, 2022
Android Multi Theme Switch Library ,use kotlin language ,coroutine ,and so on ...

Magic Mistletoe Android多主题(换肤)切换框架 背景 时隔四年,在网易换肤之前的思路下,做了几点改进,现在完全通过反射创建View,并且在SkinLoadManager中提供一个configCustomAttrs以支持自定义View的属性插队替换 摈弃了之前的AsyncTask

Mistletoe 18 Jun 17, 2022
Kotrlin Programming Language Cross-Platform Development which includes Android, iOS and Backend. Pretty much everwhere.

Kotlin-Everywhere: Kotlin Programming Language Cross-Platform Development This is still a WIP but the idea is to create a tiny KOTLIN project that cou

Fernando Cejas 31 Aug 9, 2022
It is a project that contains lessons and examples about Kotlin programming language. 🇰

Kotlin Tutorials What is Kotlin? I added the platforms it supports and great resources. You can access the article from the link below: https://medium

Halil Özel 94 Dec 22, 2022
101 examples for Kotlin Programming language.

This is a collection of runnable console applications that highlights the features of Kotlin programming language. The use of console application enab

Dody Gunawinata 192 Dec 1, 2022
The Okila server project uses the Spring boot framework and uses the Kotlin language

Okila-Server The Okila server project uses the Spring boot framework and uses the Kotlin language Format Response //The response successfully format

Nankai 1 Oct 25, 2021
Practising kotlin language

Kotlin Learning About this project : 1.Starting with kotlin. 2.Creating a birthday wishing program. ?? Tech Stack: [] [] ?? Main Page: HELLO WORLD BIR

Shruti Mishra 0 Dec 4, 2021
Lambë Language 7 Dec 21, 2022
Demonstration of Object Pool Design Pattern using Kotlin language and Coroutine

Object Pool Design Pattern with Kotlin Demonstration of Thread Safe Object Pool Design Pattern using Kotlin language and Coroutine. Abstract The objec

Enes Kayıklık 7 Apr 12, 2022