Git Product home page Git Product logo

Comments (7)

raymondSeger avatar raymondSeger commented on August 17, 2024 2

"Did you find a solution?"... he didn't answer back, which means no, or he died of covid.

from meowbottomnavigation.

SrizanX avatar SrizanX commented on August 17, 2024 1

I can find it using <meow.bottomnavigation.MeowBottomNavigation> instead of <com.etebarian.meowbottomnavigation.MeowBottomNavigation> but my app crashes when I add Model in java...

Did you find a solution?

I had to downgrade the dependency version in order to run the app. If you do not have any problem with downgrading then

Add the dependencies:

dependencies {
    ...
    implementation 'com.etebarian:meow-bottom-navigation:1.2.0'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.20"
    ...
}

Add XML Widget:

   <com.etebarian.meowbottomnavigation.MeowBottomNavigation
        android:id="@+id/bottom_nav_meow"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:mbn_backgroundBottomColor="#ffffff"
        app:mbn_circleColor="#ffffff"
        app:mbn_countBackgroundColor="#ff6f00"
        app:mbn_countTextColor="#ffffff"
        app:mbn_defaultIconColor="#90a4ae"
        app:mbn_rippleColor="#2f424242"
        app:mbn_selectedIconColor="#3c415e"
        app:mbn_shadowColor="#1f212121" />

Java:

public class MainActivity extends AppCompatActivity {

    private MeowBottomNavigation bottomNavigation_meow;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        bottomNavigation_meow = findViewById(R.id.bottom_nav_meow);
        
        bottomNavigation_meow.add(new MeowBottomNavigation.Model(1,R.drawable.ic_launcher_foreground));
        bottomNavigation_meow.add(new MeowBottomNavigation.Model(2,R.drawable.ic_launcher_foreground));
        bottomNavigation_meow.add(new MeowBottomNavigation.Model(3,R.drawable.ic_launcher_foreground));

        bottomNavigation_meow.show(1,true);

        bottomNavigation_meow.setOnClickMenuListener(new Function1<MeowBottomNavigation.Model, Unit>() {
            @Override
            public Unit invoke(MeowBottomNavigation.Model model) {
                switch (model.getId()){
                    case 1:
                        Toast.makeText(bottomNavigation_meow.getContext(), "Button 1 Clicked", Toast.LENGTH_SHORT).show();
                        break;

                    case 2:
                        Toast.makeText(bottomNavigation_meow.getContext(), "Button 2 Clicked", Toast.LENGTH_SHORT).show();
                        break;

                    case 3:
                        Toast.makeText(bottomNavigation_meow.getContext(), "Button 3 Clicked", Toast.LENGTH_SHORT).show();
                        break;
                }
                return null;
            }
        });
    }
}

from meowbottomnavigation.

SrizanX avatar SrizanX commented on August 17, 2024

I can find it using <meow.bottomnavigation.MeowBottomNavigation> instead of <com.etebarian.meowbottomnavigation.MeowBottomNavigation> but my app crashes when I add Model in java...

from meowbottomnavigation.

mehdiwaysi avatar mehdiwaysi commented on August 17, 2024

I can find it using <meow.bottomnavigation.MeowBottomNavigation> instead of <com.etebarian.meowbottomnavigation.MeowBottomNavigation> but my app crashes when I add Model in java...

Did you find a solution?

from meowbottomnavigation.

raymondSeger avatar raymondSeger commented on August 17, 2024

mine also crashed by the way. Also java.

from meowbottomnavigation.

dianniseee avatar dianniseee commented on August 17, 2024

This inspection reports that different IDE and Gradle plugin versions are used. This can cause inconsistencies between IDE and Gradle builds in error reporting or code behaviour.

how will i fix this kind of error. pls someone guide me

from meowbottomnavigation.

manumathew17 avatar manumathew17 commented on August 17, 2024

I can find it using <meow.bottomnavigation.MeowBottomNavigation> instead of <com.etebarian.meowbottomnavigation.MeowBottomNavigation> but my app crashes when I add Model in java...

Did you find a solution?

I had to downgrade the dependency version in order to run the app. If you do not have any problem with downgrading then

Add the dependencies:

dependencies {
    ...
    implementation 'com.etebarian:meow-bottom-navigation:1.2.0'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.20"
    ...
}

Add XML Widget:

   <com.etebarian.meowbottomnavigation.MeowBottomNavigation
        android:id="@+id/bottom_nav_meow"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:mbn_backgroundBottomColor="#ffffff"
        app:mbn_circleColor="#ffffff"
        app:mbn_countBackgroundColor="#ff6f00"
        app:mbn_countTextColor="#ffffff"
        app:mbn_defaultIconColor="#90a4ae"
        app:mbn_rippleColor="#2f424242"
        app:mbn_selectedIconColor="#3c415e"
        app:mbn_shadowColor="#1f212121" />

Java:

public class MainActivity extends AppCompatActivity {

    private MeowBottomNavigation bottomNavigation_meow;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        bottomNavigation_meow = findViewById(R.id.bottom_nav_meow);
        
        bottomNavigation_meow.add(new MeowBottomNavigation.Model(1,R.drawable.ic_launcher_foreground));
        bottomNavigation_meow.add(new MeowBottomNavigation.Model(2,R.drawable.ic_launcher_foreground));
        bottomNavigation_meow.add(new MeowBottomNavigation.Model(3,R.drawable.ic_launcher_foreground));

        bottomNavigation_meow.show(1,true);

        bottomNavigation_meow.setOnClickMenuListener(new Function1<MeowBottomNavigation.Model, Unit>() {
            @Override
            public Unit invoke(MeowBottomNavigation.Model model) {
                switch (model.getId()){
                    case 1:
                        Toast.makeText(bottomNavigation_meow.getContext(), "Button 1 Clicked", Toast.LENGTH_SHORT).show();
                        break;

                    case 2:
                        Toast.makeText(bottomNavigation_meow.getContext(), "Button 2 Clicked", Toast.LENGTH_SHORT).show();
                        break;

                    case 3:
                        Toast.makeText(bottomNavigation_meow.getContext(), "Button 3 Clicked", Toast.LENGTH_SHORT).show();
                        break;
                }
                return null;
            }
        });
    }
}

Thanks
Solved the issue

from meowbottomnavigation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.