Skip to content

Instantly share code, notes, and snippets.

package com.example.android.rssfeed;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceCategory;
/**
* @author: Fabio Zadrozny
* @licenes: EPL
**/
package com.brainwy.liclipse.theme.e4;
import org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler;
import org.eclipse.e4.ui.css.core.engine.CSSEngine;
import org.eclipse.e4.ui.css.swt.dom.ControlElement;
public class Address {
private String street;
private int housenumber;
private int postalCode;
private String city;
public String getStreet() {
return street;
}
package com.vogella.nebula.nattable.model;
import java.util.Date;
public class Person {
public enum Gender {
MALE, FEMALE
}
private final int id;
package com.example.e4.renderer.swt;
import org.eclipse.e4.ui.model.application.ui.MDirtyable;
import org.eclipse.e4.ui.model.application.ui.MUILabel;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.e4.ui.workbench.UIEvents;
import org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer;
import org.eclipse.swt.custom.CTabItem;
public class MyStackRenderer extends StackRenderer {
package com.example.e4.rcp.todo.parts;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.di.Focus;
import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.swt.SWT;
@vogella
vogella / gist:937ab05098f7aac43fd5
Created November 19, 2014 00:31
Android exercise - Description to convert the static RSSFeedreader into a dynamic one
Download and import
http://www.vogella.com/download/androidexpert/rssfeedreader_static.zip
Exercise / Part 1
Remove layouts for portrait mode.
Replace content of activity_rssfeed.xml layout with a placeholder element. Use FrameLayout as a placeholder.
@vogella
vogella / gist:1fbb3c1f02130f7acba5
Created November 19, 2014 14:13
Otto exercise
Download Otto JAR from http://square.github.io/otto/
Build new Android project using the
<code>Blank Activity with Fragment</code>
template.
Create an Bus singleton and add a button to the fragment to send events to your activity.
Via the option menu send data to the fragment
Display a Toast in both cases
@vogella
vogella / Util
Last active August 29, 2015 14:22
package com.vogella.android.testing.mockitocontextmock;
import android.content.Context;
import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.IOException;
public class Util {
public static void writeConfiguration(Context ctx ) {
package com.example.e4.rcp.todo.toolcontrols;
import java.util.Objects;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;