Question: Say I have a web app - a large, complex, rails app, like an accounting application. I see a use for several single page apps instead of the typical rails round tripping pages. For example, I can see a user better served with an intuitive single page/dynamic app for:

* Creating Bank Reconciliation
* Creating an Invoice
* Filling out a Time Report
* etc..

These are all distinct one page apps...

All the ember apps I see are single page and single purpose. 

I want to have many single page apps, built with ember. How would that look with respect to:

Routes: I'd have a combination of server routes and client routes. How would that look in Ember? Serve different Ember applications, each with their own application router and routes?

Templates: Would all my "applets" get compiled and pushed down to the client on load? Or would I leverage require.js and load each single page app depending on if they're navigated to?
...

Can anyone help with those two questions?
Thanks in advance!

Answer: 
use this code

```
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <LinearLayout
        android:id="@+id/linlayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >

        <FrameLayout
            android:id="@+id/f1"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:background="#468432" >

        </FrameLayout>

        <FrameLayout
            android:id="@+id/f2"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:background="#ff8222" >

        </FrameLayout>

    </LinearLayout>

</ScrollView>

```

and your activity gose like following

```
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.widget.LinearLayout.LayoutParams; 
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.widget.FrameLayout;
import android.widget.LinearLayout;

    public class MainActivity extends Activity {

        LinearLayout layout ;
        FrameLayout f1,f2;
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);

            layout = (LinearLayout)findViewById(R.id.linlayout);
            f1=(FrameLayout) findViewById(R.id.f1);
            f2=(FrameLayout) findViewById(R.id.f2);
            ViewTreeObserver vto = layout.getViewTreeObserver(); 
            vto.addOnGlobalLayoutListener(new OnGlobalLayoutListener() { 
                @Override 
                public void onGlobalLayout() { 
                    layout.getViewTreeObserver().removeGlobalOnLayoutListener(this); 
                    int width  = layout.getMeasuredWidth();
                    int height = layout.getMeasuredHeight(); 

                    f1.setLayoutParams(new LayoutParams(width, height));
                    f2.setLayoutParams(new LayoutParams(width, height));
                } 
            });
        }

        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            // Inflate the menu; this adds items to the action bar if it is present.
            getMenuInflater().inflate(R.menu.main, menu);
            return true;
        }

    }

```
I had the hardest time once trying to achieve this in the iphone, maybe the ideas will help you. What I had was a background view with a notebook style set of lines, and a view on top of that with text, and of course they had to scroll together. I added both to the ScrollView and just intercepted the "scrollViewDidScroll" for view1 and did a view2.contentOffset=view2.contentOffset so that they stayed 'glued'. i just started on Android so I wouldn't know how to exactly achieve this there, but I think the principle wouldn't be much different. Hope this helps :)