Closed amdsubham closed 6 years ago
Try to replace this:
import android.support.v7.widget.Toolbar;
With this:
import androidx.appcompat.widget.Toolbar;
By the way, if you are using androidx. Run its migration process. The android support libraries will not be supported in the future. You can read about it here:
@amdsubham if you don't sue androidX you have to use a version prior to v6.1.0 (so something like 6.0.9 or lower..)
It is mentioned here: https://github.com/mikepenz/MaterialDrawer#1-provide-the-gradle-dependency
you can also see all available version in the releases.
thanks @burekas7 for answering :)
It shows error shows as withToolbar (androidx.appcompat.widget.Toolbar) in DrawerBuilder cannot be applied to (android.support.v7.widget.Toolbar) Here------------- result = new DrawerBuilder() .withActivity(this) .withToolbar(toolbar)
package com.example.mahers.wholesaller;
import android.content.Intent; import android.graphics.Typeface; import android.os.Bundle; import android.support.v4.content.res.ResourcesCompat; import android.support.v4.view.GravityCompat; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import android.widget.Toast;
//import com.beingdev.magicprint.prodcutscategory.Bags; //import com.beingdev.magicprint.prodcutscategory.Calendars; //import com.beingdev.magicprint.prodcutscategory.Cards; //import com.beingdev.magicprint.prodcutscategory.Keychains; //import com.beingdev.magicprint.prodcutscategory.Stationary; //import com.beingdev.magicprint.prodcutscategory.Tshirts; import com.example.mahers.wholesaller.usersession.UserSession; import com.daimajia.slider.library.SliderLayout; import com.daimajia.slider.library.SliderTypes.DefaultSliderView; import com.getkeepsafe.taptargetview.TapTarget; import com.getkeepsafe.taptargetview.TapTargetSequence; import com.mikepenz.aboutlibraries.Libs; import com.mikepenz.aboutlibraries.LibsBuilder; import com.mikepenz.crossfadedrawerlayout.view.CrossfadeDrawerLayout; import com.mikepenz.materialdrawer.AccountHeader; import com.mikepenz.materialdrawer.AccountHeaderBuilder; import com.mikepenz.materialdrawer.Drawer; import com.mikepenz.materialdrawer.DrawerBuilder; import com.mikepenz.materialdrawer.MiniDrawer; import com.mikepenz.materialdrawer.interfaces.ICrossfader; import com.mikepenz.materialdrawer.model.DividerDrawerItem; import com.mikepenz.materialdrawer.model.PrimaryDrawerItem; import com.mikepenz.materialdrawer.model.ProfileDrawerItem; import com.mikepenz.materialdrawer.model.SecondaryDrawerItem; import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem; import com.mikepenz.materialdrawer.model.interfaces.IProfile; import com.mikepenz.materialdrawer.util.DrawerUIUtils; import com.mikepenz.materialize.util.UIUtils; import com.webianks.easy_feedback.EasyFeedback;
import java.util.ArrayList; import java.util.HashMap;
import es.dmoral.toasty.Toasty;
public class MainActivity extends AppCompatActivity {
}