Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Can't resole getValues method in OnlistItemSelectred for AssetListScree
[color=#000000][font="Courier New"][size=9pt][b][color=#000080]I am new to Liferay Screens and mobile development. In my code the [/color][/b]getValues method in OnlistItemSelectred for AssetListScreenLet wont resolve. Am I doing this properly in this method?[b][color=#000080]
package [/color][/b]io.yahlife.yahlifenation;
[b][color=#000080]import [/color][/b]android.content.Intent;
[b][color=#000080]import [/color][/b]android.support.v7.app.AppCompatActivity;
[b][color=#000080]import [/color][/b]android.os.Bundle;
[b][color=#000080]import [/color][/b]android.view.View;
[b][color=#000080]import [/color][/b]com.liferay.mobile.android.callback.typed.LongCallback;
[b][color=#000080]import [/color][/b]com.liferay.mobile.screens.asset.AssetEntry;
[b][color=#000080]import [/color][/b]com.liferay.mobile.screens.asset.list.AssetListScreenlet;
[b][color=#000080]import [/color][/b]com.liferay.mobile.screens.base.list.BaseListListener;
[b][color=#000080]import [/color][/b]com.liferay.mobile.screens.viewsets.defaultviews.DefaultAnimation;
[b][color=#000080]import [/color][/b]java.lang.*;
[b][color=#000080]import [/color][/b]java.util.List;
[b][color=#000080]public class [/color][/b]Resolutions2 [b][color=#000080]extends [/color][/b]AppCompatActivity [b][color=#000080]implements [/color][/b]BaseListListener{
[color=#808000]@Override
[/color][color=#808000] [/color][b][color=#000080]protected void [/color][/b]onCreate(Bundle savedInstanceState) {
[b][color=#000080]super[/color][/b].onCreate( savedInstanceState );
setContentView( R.layout.[b][color=#660e7a][i]activity_resolutions2 [/i][/color][/b]);
AssetListScreenlet assetListScreenlet = findViewById( R.id.[b][color=#660e7a][i]resolutions_list [/i][/color][/b]);
assetListScreenlet.setPortletItemName( [b][color=#008000]"Yahlife Resolutions" [/color][/b]);
assetListScreenlet.setListener( (BaseListListener) [b][color=#000080]this [/color][/b]);
}
[color=#808000]@Override
[/color][color=#808000] [/color][b][color=#000080]public void [/color][/b]onListPageFailed([b][color=#000080]int [/color][/b]i, Exception e) {
}
[color=#808000]@Override
[/color][color=#808000] [/color][b][color=#000080]public void [/color][/b]onListPageReceived([b][color=#000080]int [/color][/b]i, [b][color=#000080]int [/color][/b]i1, List list, [b][color=#000080]int [/color][/b]i2) {
}
[color=#808000]@Override
[/color][color=#808000] [/color][b][color=#000080]public void [/color][/b]onListItemSelected(Object o, View view) {
Intent intent = [b][color=#000080]new [/color][/b]Intent(Resolutions2.[b][color=#000080]this[/color][/b], AssetDisplayActivity.[b][color=#000080]class[/color][/b]);
intent.putExtra( [b][color=#008000]"entryId"[/color][/b], Long.valueOf(o.[color=#ff0000]getValues()[/color].get([b][color=#008000]"entryId"[/color][/b]).toString()) );
DefaultAnimation.[i]startActivityWithAnimation[/i]( [b][color=#000080]this[/color][/b], intent );
}
[color=#808000]@Override
[/color][color=#808000] [/color][b][color=#000080]public void [/color][/b]error(Exception e, String userAction) {
}
}
[/size][/font][/color]
Should be
implements BaseListListener<assetentry></assetentry>
Javier GamarraShould be
implements BaseListListener<assetentry></assetentry>
That worked. Thanks!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™