K
K
Kirill Yaroshevich2018-02-16 18:28:24
Android
Kirill Yaroshevich, 2018-02-16 18:28:24

How to start Java Activity?

How can I make it so that I can launch another Activity on another section in this code, for example, which is located in the NavigationDrawer. I have a transition to the site here, but I need to activate

ipdCardBuilder.addItem(new MaterialAboutActionItem.Builder()
                .text("ВКонтакте")
                .icon(R.drawable.ic_vk_grey600_24dp)
                .setOnClickAction(ConvenienceBuilder.createWebsiteOnClickAction(c, Uri.parse("https://vk.com/РРРР")))
                .build());

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-02-16
@kiruha_21

Should work like this

ipdCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text("Уже не ВКонтакте")
.icon(R.drawable.ic_vk_grey600_24dp)
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
@Override
public void onClick() {
   Intent i = new Intent(getApplicationContext(), SecondActivity.class);
   startActivity(i);
}
})
.build());

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question