Skip to content

Instantly share code, notes, and snippets.

package net.firepush.adnet;
import com.adobe.fre.FREContext;
import com.adobe.fre.FREExtension;
public class FirePushExtension implements FREExtension {
@Override
public FREContext createContext(String arg0) {
return new FirePushContext();
}
package net.firepush.adnet
{
/**
* ...
* @author marinat
*/
import flash.external.ExtensionContext;
public class FirePushExtension
package net.firepush.adnet;
import android.content.Context;
import android.util.Log;
import com.adobe.fre.FREContext;
import com.adobe.fre.FREFunction;
import com.adobe.fre.FREObject;
public class ShowBannerFunction implements FREFunction{
@Override
public FREObject call(FREContext context, FREObject[] args) {
package net.firepush.adnet {
import flash.external.ExtensionContext;
public class FirePushExtension {
private static var context:ExtensionContext;
public static function init():void {
if(!context) context = ExtensionContext.createExtensionContext("net.firepush.adnet.FirePushLib", null);
public class Generator {
private static final Map<byte[], byte[]> cache = new HashMap<byte[], byte[]>();
public static byte[] generate(byte[] src) {
byte[] generated = cache.get(src);
if (generated == null) {
synchronized (cache) {
generated = cache.get(src);
if (generated == null) {
generated = doGenerate(src);
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
WebTitle webTitle = mBrowser.getTabsActionBar().getTitle();
if (t > oldt) {
Tracer.debug("SCROLL", "tbar = " + webTitle.getY() + " t height = " + webTitle.getHeight());
if (-(webTitle.getY() - (t - oldt)) > webTitle.getHeight())
webTitle.setTranslationY(-webTitle.getHeight());
else
webTitle.setY(webTitle.getY() - (t - oldt));
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffff" >
<com.example.wwwithscrolltest.CustomScrollView
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent" >
package com.example.wwwithscrolltest;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.EditText;
public class MainActivity extends Activity {
WebView wv;
package com.example.wwwithscrolltest;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.EditText;
import android.widget.ScrollView;
public final class CustomScrollView extends ScrollView {
public EditText title;
package com.example.wwwithscrolltest;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;