Hello to SO and NativeScript. As an initial advice, you should consider not just asking a bunch of questions but also showing your approach and what you have achieved so far. Use this guide and if you want to receive answers that will really help you with your project, follow the guidelines.
Now, let me try to answer to some of your questions.
1.) Not sure if you are asking about how to visually move the element or for example if you need to create the logic to add items to and array of favoriteItems. I assume the first case:
You need to move the element from x and y coordinates to your top corner.
Animations
page.js
var view = page.getViewById(""my-f-view");
view.animate({
translate: { x: 100, y: -100},
duration: 3000
});
You can probably triger this animation when the item is tapped.
2.) You can wrap it in ScrollView
<Page>
<ScrollView>
<StackLayout height="1600">
// some content
</StackLayout>
</ScrollView>
</Page>
3.) To display a list of data you can use ListView or Repeater.
Example:
page.xml
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo">
<ListView items="{{ myItems }}" itemTap="listViewItemTap">
<ListView.itemTemplate>
<Label text="{{ title || 'Downloading...' }}" textWrap="true" class="title" />
</ListView.itemTemplate>
</ListView>
</Page>
page.ts (note this is TypeScript project example)
import { EventData, Observable } from "data/observable";
import { ObservableArray } from "data/observable-array";
import { Page } from "ui/page";
import { ItemEventData } from "ui/list-view";
import frameModule = require("ui/frame");
let viewModel = new Observable();
let myItems = new ObservableArray( {title: "Core Concepts"},
{title: "User Interface"},
{title: "Plugins"},
{title: "Cookbook"},
{title: "Tutorials"} );
export function navigatingTo(args: EventData) {
var page = <Page>args.object;
viewModel.set("myItems", myItems);
// ListView will be updated automatically when new item is pushed.
myItems.push({title:"Publishing"});
page.bindingContext = viewModel;
}
export function listViewItemTap(args:ItemEventData) {
var itemIndex = args.index;
// example how to navigate details-page & pass the tapped item context
// frameModule.topmost().navigate({
// moduleName: "./details-page",
// context: myItems.getItem(itemIndex);
// });
}
4.) Simply import your JSON file and parse it to the kind of data you are expected to pass in your context. Refer to this SO thread where similar discussion is present