Obteniendo un error con la barra de acción johannilssen
Frecuentes
Visto 84 veces
0
i'm developing an android app for 2.3.3, but I want to use an actionbar. After looking around for a bit I found johan nilssen ActionBar so I tried that.
I followed the whole README, but I'm getting error's at 2 functions which are not described.
actionBar.setHomeAction(new IntentAction(this, MainActivity.createIntent(this), R.drawable.ic_title_home_default));
actionBar.addAction(new IntentAction(this, createShareIntent(), R.drawable.ic_title_share_default));
It gives these error's
The Method createIntent(MainActivity) is undefined for the type MainActivity
Y
The method createShareIntent() is undefined for the type MainActivity.
I tried to make the methods myself but that did not worked out because I don't know what I have to put in.
2 Respuestas
0
Do you not need to give this Activity
new name and declare it in Manifest
Me gusta esto:
<activity
android:name=".HomeActivity"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="package name.HomeActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Respondido 28 ago 12, 22:08
Can you explain that a little more, I don't know what you mean exactly. - elcad
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas java android android-actionbar or haz tu propia pregunta.
Post the link/stuff that u have followed.So that community can help you better. - Mohit