Skip to content

Instantly share code, notes, and snippets.

View javiergamarra's full-sized avatar
😠

Javier Gamarra javiergamarra

😠
View GitHub Profile
<com.liferay.mobile.screens.webcontentdisplay.WebContentDisplayScreenlet
android:layout_width="match_parent"
android:layout_height="match_parent"
app:articleId="79236"/>
<com.liferay.mobile.screens.ddl.list.DDLListScreenlet
android:layout_width="match_parent"
android:layout_height="match_parent"
app:labelFields="Title,Subtitle"
app:recordSetId="79281"
app:layoutId="@layout/ddl_list_material"/>
<com.liferay.mobile.screens.ddl.form.DDLFormScreenlet
android:id="@+id/ddl_form"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutId="@layout/ddl_form_default"
app:recordSetId="79281"
app:structureId="79279"/>
@javiergamarra
javiergamarra / content_main.xml
Created October 8, 2015 13:15
login screenlet
<com.liferay.mobile.screens.auth.login.LoginScreenlet
android:layout_width="match_parent"
android:layout_height="match_parent"
app:basicAuthMethod="email"
app:layoutId="@layout/login_default"/>
@javiergamarra
javiergamarra / server_context.xml
Created October 8, 2015 13:14
example server for AT & workshops
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="liferay_server">http://audiencetargeting.liferay.org.es/</string>
<string name="liferay_company_id">20155</string>
<string name="liferay_group_id">78201</string>
</resources>
@javiergamarra
javiergamarra / build.gradle
Created October 8, 2015 13:11
exclude packaging options
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
@javiergamarra
javiergamarra / build.gradle
Created October 8, 2015 13:10
liferay screens dependency
compile 'com.liferay.mobile:liferay-screens:+'
<?xml version="1.0" encoding="utf-8"?>
<com.liferay.mobile.screens.viewsets.defaultviews.webcontentdisplay.WebContentDisplayView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/liferay_webview_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@javiergamarra
javiergamarra / gist:485e8af27775b7fd7834
Created September 1, 2015 11:18
Add image with 200dpi in PDFBox (for a friend)
double resolution = 200;
double points = 72;
double ratio = resolution / points;
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), drawable);
Double width = bitmap.getWidth() / ratio;
Double height = bitmap.getHeight() / ratio;