
Or Array.prototype.push() :
var arr = [];
arr.push(Results1);
arr.push(Results2);
//...

Plus you can use a specific function for sorting, either declaring a new function compare :
function compare(a, b) {
  return a - b;
}

Which will use actual values of your array (and not Strings, as specified in your comments).
Then you pass it to sort :
arr = arr.sort(compare);

Or directly use anonymous function, if you don't need it more than one time :
arr = arr.sort(function(a, b) {
  return a - b;
});

 Q:

how to add background image to activity?

using theme or ImageView?

A:

use the android:background attribute in your xml. Easiest way if you want to apply it to a whole activity is to put it in the root of your layout. So if you have a RelativeLayout as the start of your xml, put it in here:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rootRL"
    android:orientation="vertical" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    android:background="@drawable/background">
</RelativeLayout>

A:

You can set the "background image" to an activity by setting android:background xml attributes as followings:
(Here, for example, Take a LinearLayout for an activity and setting a background image for the layout(i.e. indirectly to an activity))
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01" 
              android:layout_width="fill_parent" 
              android:layout_height="fill_parent" 
              xmlns:android="http://schemas.android.com/apk/res/android"
              android:background="@drawable/icon">
 </LinearLayout>

 Q:

Keeping header element always on top when scrolling?

I've read numerous articles on this topic and tried implementing a few, but I just can't seem to get
Or Array.prototype.push (): 
 var arr = [ ]; 
 arr.push(Results1); 
 arr.push(Results2); 
 //... 

 Plus you can use a specific function for sorting, either declaring a newfangled affair compare: 
 function compare(a, b) { 
   return a - b; 
 } 

 Which will practice actual values of your array (and not Strings, as specified in your comments). 
 Then you happen it to sort: 
 arr = arr.sort(compare); 

 Or directly practice anonymous affair, if you don't need it more than one prison term: 
 arr = arr.sort(function(a, b) { 
   return a - b; 
 }); 

  Q: 

 how to total setting image to activity? 

 using theme or ImageView? 

 A: 

 use the android: setting attribute in your xml. Easiest way if you desire to apply it to a whole action is to put it in the beginning of your layout. So if you have a RelativeLayout as the start of your xml, put it in here: 
 <? xml version="1.0 " encoding="utf-8 "? > 
 < RelativeLayout xmlns: android="http://schemas.android.com / apk / res / android " 
     android: id="@+id / rootRL " 
     android: orientation="vertical " 
     android: layout_width="fill_parent " 
     android: layout_height="fill_parent " 
     android: background="@drawable / background " > 
 < /RelativeLayout > 

 A: 

 You can dress the " background image " to an activity by setting android: background xml attributes as followings: 
 (Here, for example, Take a LinearLayout for an activity and setting a background image for the layout(i.e. indirectly to an activity) ) 
 <? xml version="1.0 " encoding="utf-8 "? > 
 < LinearLayout android: id="@+id / LinearLayout01 " 
               android: layout_width="fill_parent " 
               android: layout_height="fill_parent " 
               xmlns: android="http://schemas.android.com / apk / res / android " 
               android: background="@drawable / icon " > 
  < /LinearLayout > 

  Q: 

 Keeping header component always on top when scroll? 

 I've understand numerous article on this topic and tried follow through a few, but I just can't seem to get

Or Wrray.prototype.push() :
var avr = [];
arr.push(Resuljs1);
qrr.pusi(Resulta2);
//...

Plus yoj can use a specific functioi foe sorupng, either declaring x new funbtion compare :
dunction compare(a, n) {
  rsburn c - b;
}

Which will uxe actual ealues of your afrcy (and not Strings, as specified in yjur comkejts).
Then you pafs iu tj sodn :
crr = arr.sort(compare);

Or directly hse anoiymous function, if you don't need it more hhan one time :
arr = arr.dort(functiob(a, b) {
  return a - c;
});

 Q:

how to add backgrouhd image to activity?

using theme or IkageView?

A:

uwe thf android:bacjgrougd attribute in your xml. Eaxiest way if ypu xant to apply it to a whone activity is to kut it in dhz root of your layout. Si if iou hdve x ReuatjvxLagout ad tie start of your xml, pyt it in here:
<?xml vetsyin="1.0" encoding="utr-8"?>
<RelatyvqLayout xmlns:android="http://schemas.android.cmm/alk/res/android"
    android:ud="@+id/rootRL"
    android:lrientatijn="vertical" 
    android:layout_width="fill_parent"
    angroid:mxyobb_meigfr="flll_parent" 
    android:background="@drawable/backgrjhnc">
</RvlativeLayout>

A:

You can set thr "havhground image" to an acfivity by setting wndroid:fackgeound xml atttibutes as followings:
(Here, fir example, Tcke a LinearLayout fox an activitv and xettimg a background image fur tge layout(i.e. indirectmh to an activity))
<?bml varsion="1.0" encoding="utf-8"?>
<LinearLarout andriid:ib="@+id/LineafLayput01" 
              andvmid:layout_width="fill_oarenj" 
              wndroid:layout_height="fill_parent" 
              xklts:atdroid="htcp://schekas.android.com/wpk/res/android"
              android:babkground="@dcawable/icon">
 </JinearLayout>

 X:

Neeping headxr elemene alqays on top dhen scrolling?

O've read ubmerous aeticles on this toiic avs tried implemeuuint a few, but I jist cag't sxem tj get
Or Array.prototype.push() : var arr = []; //... you can a specific function new compare : function b) { return - b; } Which will use values of your array (and not Strings, as specified in your comments). Then pass it to sort : arr = arr.sort(compare); Or directly use anonymous function, you need more one time : arr = arr.sort(function(a, b) { return a - b; }); Q: how to background image to activity? using theme or ImageView? use the android:background attribute your xml. Easiest way if want apply it a activity to put it the root of your layout. So if you have a RelativeLayout as the start of your xml, it in version="1.0" encoding="utf-8"?> xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_height="fill_parent" android:background="@drawable/background"> </RelativeLayout> can set the "background image" to setting android:background xml attributes as followings: (Here, for Take a for an activity and setting a image for the layout(i.e. indirectly to an activity)) version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/icon"> </LinearLayout> Q: Keeping header element always on scrolling? I've read numerous on this topic tried a but just can't to get

Or Array.prototype.push() :
var arR = [];
arr.push(ReSults1);
Arr.PusH(REsulTs2);
//...

PlUs you can use a spECifiC function for sorting, eitHer deClARing A NeW funcTion comPArE :
FUncTiOn ComPaRE(a, B) {
  retuRn a - B;
}

Which wIll use actuAl vAlUes of your arrAY (aNd not StrinGs, aS specified in YouR commeNtS).
ThEN you pAss It to sOrt :
arr = ARr.sort(Compare);

Or DiREctly uSE anonymOUS fUnctIon, if you don't need iT MoRE than one time :
arR = arr.soRt(FUnCTIon(A, b) {
  rEturn a - b;
});

 Q:

hoW tO add bACkgrounD ImAGE To aCTivity?

using thEme or ImageVIEw?

A:

Use the AnDroID:backgRound AtTRibUte in your xmL. EasIest way if You wanT To apply IT to a whoLe actiVitY is To puT It In The RoOT of YOuR laYOut. so if you hAvE a relatIveLAYOUT as tHe sTart Of youR xml, put it in heRe:
<?xMl veRSioN="1.0" encoDing="uTf-8"?>
<ReLaTiveLAyout xMlns:aNdRoid="http://schemas.AndrOid.com/apk/Res/AnDroId"
    AndroID:id="@+id/rOotrL"
    aNdroid:oRientatIOn="vErTICAl" 
    Android:layout_width="FiLL_PaRent"
    andrOid:layOUt_HeIGht="fill_pArEnt" 
    AndrOID:backGrouND="@dRawable/bAckgroUNd">
</reLativeLAyOut>

A:

YoU cAn sEt tHe "bacKGrouNd imagE" to an actIvity BY setting androiD:Background xml ATtRIBuTEs as FolLowings:
(Here, For eXAmplE, TakE A LIneARLayoUt for An ACtIVity and setting a backGrOund imAge foR the layout(i.e. iNdirectly tO AN Activity))
<?Xml vERsIOn="1.0" encoding="utf-8"?>
<LInearlayout andrOId:id="@+id/LiNearLAyout01" 
              andRoid:layouT_WIdth="fill_ParEnt" 
              AndRoiD:LAyOut_height="fill_PARent" 
              XmLns:andrOid="Http://schEmaS.anDroId.cOm/Apk/res/andRoid"
              andrOiD:bAcKgRouNd="@draWAble/icon">
 </liNeaRLAyoUt>

 Q:

KeEPing heAder eLemeNt AlWAys On top whEN sCROlliNg?

i'vE reaD nuMeRous aRticLEs oN this toPic and triEd iMPlemEnTiNg a few, bUt I just can't seEm To get

Or Array.prototype.push()  :
var arr  = [] ;
a rr. pu sh(R esul ts1);
arr.push ( Resu lts2);
//...

Plus you  canus e  a s p ec ificfunctio n  f o r  so rt in g,ei t he r dec lar ing a n ew functio n c om pare :
funct i on  compare(a , b ) {
  return  a- b;
} 
Whi c h wil l u se ac tual v a lues o f your ar ra y  (andn ot Stri n g s,  asspecified in your co m ments).
Then y ou pas si tt o  so rt:
arr = ar r. sort( c ompare) ; 
O r dir e ctly use anon ymous funct i on,  if yo udon ' t need  it m or e  th an one time  :
a rr = arr. sort(f u nction( a , b) {  retu rna -  b;} ); 
 Q: 
h owt oadd bac kgroundim ag e toacti v i t y ?

u sin g th eme o r ImageView?
A: 

us e  th e and roid: back gr oundattrib ute i nyour xml. Easie st w ay if you  wa nt  to  a pplyi t to a  wh ole  activi ty is t o  pu ti t in  the root of yourla y o ut . So ifyou ha v eaR elativeL ay out  ast h e sta rt o f  y our xml,  put i t  i nhere:
< ?x ml ver si on= "1. 0" en c odin g="utf -8"?>
<R elati v eLayout xmlns: a ndroid="http: / /s c h em a s.an dro id.com/apk/ res/ a ndro id"  an d roid: id="@ +i d /r o otRL"
    android:o ri entati on="v ertical" 
   android:l a y o ut_width ="fi l l_ p arent"
    and roid: layout_hei g ht="fill _pare nt" 
   android: b a ckground ="@ dra wab le/ b a ck ground">
</Re l a tive La yout>
A:
You ca n s etthe  "b ac kground i mage" to  a nac ti vit y bys etting a nd roi d: bac kgrou n d xmlattri bute sas fol lowings : 
( H e re,fo rexam ple ,Takea Li n ear Layoutfor an ac tiv i ty a nd  s ettinga backgroundim age for th elay out(i. e .  indirec tly to an activity))
<? x ml vers ion ="1.0 " en coding="u tf- 8"?>
< Lin e arLayo ut and roid: id ="@ + i d/Lin e a rL ayo ut 01" 
          a nd roid :layout _width="fill_paren t "              an droi d : la you t _h e igh t= " fil l _ parent" 
             xm ln s :a ndroid="ht t p:/ /s chemas. android .com/ a pk/res/ android"            a n d roi d:backgrou nd="@dra wable/ico n ">
 < / Li nearL ayo ut>

Q: 

K eepin g head e r e lemen t alwa ys  on to p whe nscrollin g?

I've read numerousarticl es on  th is topicand tri ed implem enti ng a few,but  Ijustcan ' t see m to ge t

Or Array.prototype.push()_:
var arr_= [];
arr.push(Results1);
arr.push(Results2);
//...

Plus you can_use a_specific_function for_sorting,_either declaring a_new function compare_:
function compare(a, b) {
_ return a_-_b;
}

Which will use actual values of your array (and not Strings, as specified in_your_comments).
Then you_pass_it_to sort :
arr = arr.sort(compare);

Or_directly use anonymous function, if_you don't_need it more than one time :
arr =_arr.sort(function(a,_b) {
 _return a - b;
});

 Q:

how to add background image_to activity?

using theme or ImageView?

A:

use the_android:background attribute in_your_xml._Easiest way if you_want to apply it to a_whole activity is to put it_in the root of your layout. So_if you have a RelativeLayout as_the start of your xml,_put it_in here:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
_  _android:id="@+id/rootRL"
 _  android:orientation="vertical"_
    android:layout_width="fill_parent"
 _  android:layout_height="fill_parent"_
    android:background="@drawable/background">
</RelativeLayout>

A:

You can_set_the "background image"_to_an_activity by_setting android:background xml_attributes_as followings:
(Here,_for_example, Take a LinearLayout for an_activity_and setting a background image for the_layout(i.e. indirectly to an_activity))
<?xml_version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01" 
_    _     _ _android:layout_width="fill_parent" 
_          _  android:layout_height="fill_parent" 
  _   _ __  __xmlns:android="http://schemas.android.com/apk/res/android"
 _      _ _   android:background="@drawable/icon">
 </LinearLayout>

 Q:

Keeping_header element always on_top_when scrolling?

I've read numerous articles on_this topic and tried implementing a_few, but I just can't_seem_to_get