Popularity
0.5
Growing
Activity
0.0
Stable
3
1
1

Description

change-scene is an easy to use utility to switch between different layouts without writing much code.

Benefits: -Separates different states with different layouts. -You can provide custom layout to be switched to. -Progress-scene support for showing progress bar. -Boilerplate code related with view visibility/invisibility is gone.

Programming language: Kotlin
Tags: Tools     Layout     Android-library    
Latest version: v1.1.0

change-scene alternatives and similar packages

Based on the "Tools" category.
Alternatively, view change-scene alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of change-scene or a related project?

Add another 'Tools' Package

README

change-scene

helps easily switch between different layouts without writing much code of View visibility.

Setup

Add change-scene to your dependencies block:

    compile 'com.github.rajuse.changescene:change-scene:1.1.0'

Usage

ChangeSceneLayout

Add a ChangeSceneLayout to your layout just like any other view.

<dev.raju.lib.changescene.ChangeSceneLayout
        android:id="@+id/rootView"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <!--Your Default-Scene-->

</dev.raju.lib.changescene.ChangeSceneLayout>

For example:

    <dev.raju.lib.changescene.ChangeSceneLayout
        android:id="@+id/rootView"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:textColor="@android:color/white" />
    </dev.raju.lib.changescene.ChangeSceneLayout>

To design Default-Scene, there are 3 options: ChangeSceneLayout is custom RelativeLayout ChangeSceneConstraintLayout is custom ConstraintLayout ChangeSceneLinearLayout is custom LinearLayout

methods:

  • Change to your custom layout (custom-scene) #changeScene(R.layout.custom_scene);

  • Change to progressbar #showProgressScene(String progMessage)

  • Change to default-scene(i.e. childs of ChangeSceneLayout) #showContentScene();

Benefits

  • Separates different states with different layouts.
  • You can provide custom layout to be switched to.
  • Progress-scene support for showing progress bar.
  • Boilerplate code related with view visibility/invisibility is gone.

Contributing

As always any enhancements, PRs and bugs report will be highly appreciated. :-)