DroidScript(cepte yada pcde programlama)

Sponsorlu Bağlantılar

Tufkan

Tufkan

Üye
olmuyor açmıyor
tr versionu hala hazır deilmi?
Hala hazır deilmi?

Bunlara her biri farkalı seçildiğinde farklı resimlere girmesini istiyorum lutfen yardim
 


SHS

SHS

Üye
Türkçeleştirilmesinde yardımcı olabilirim
 
  • Beğen
Tepkiler: Tufkan
Tufkan

Tufkan

Üye
Eger yapabilirsen hemen sevinirim
Seloseft burdasın belli oluyo bu demin paylastigim resim e bi yardimci olurmusun?
 
SHS

SHS

Üye
Eger yapabilirsen hemen sevinirim
Seloseft burdasın belli oluyo bu demin paylastigim resim e bi yardimci olurmusun?

Daha indirip inceleme şansım olmadı ama ilgilenicem yarın
 
  • Beğen
Tepkiler: Tufkan
Tufkan

Tufkan

Üye
Saol simdiden
Saol simdiden
 
SeloSoftt

SeloSoftt

Üye
    Konu Sahibi
Merhaba cevap vermeye pek vaktim olmadı kusura bakmayın öcelikle ;

Türkçeleştirme işini bugün bitirirsem yüklerim buraya , vakit zor bulunan birşey tam gün çalışan biri olunca .
şimdi öncelikle istediğin background kodlarını hazırladım onlar için normal image dosyaları ve renk kodları kullanabilmen için 2 ayrı kod hazırladım ilk kod ;
bu img dosyalı yani resim ekleyebileceğin kod (png,jpg)


Kod:
//Called when application is started.
function OnStart()
{
    //Create a layout with objects vertically centered.
    lay = app.CreateLayout( "linear", "VCenter,FillXY" ); 
   lay.SetBackground( "Img/abc.jpg" );



    //Create a text label and add it to layout.
    txt = app.CreateText( "DEMO Background" );
    txt.SetTextSize( 32 );
    lay.AddChild( txt );
 
     res = app.CreateSpinner( "1,2,3");
    res.SetOnTouch(resim);
   lay.AddChild( res );

       txt = app.CreateText( "SeloSoft" );
    txt.SetTextSize( 32 );
    lay.AddChild( txt );

 
    //Add layout to app. 
    app.AddLayout( lay );
}




function resim()
{
if(res.GetText() == "1")
{
lay.SetBackground( "Img/a.jpg" );
}
else if( res.GetText() == "2")
{
lay.SetBackground( "Img/b.png" );
}
else if( res.GetText() == "3" )
{
lay.SetBackground( "Img/c.jpg" );
}

else
{
lay.SetBackground( "Img/abc.jpg" );
}
}



bu da renk kodlu olan ;

Kod:
//Called when application is started.
function OnStart()
{
    //Create a layout with objects vertically centered.
    lay = app.CreateLayout( "linear", "VCenter,FillXY" ); 
    lay.SetBackColor( "#ff444444" );
    //Create a text label and add it to layout.
    txt = app.CreateText( "DEMO" );
    txt.SetTextSize( 32 );
    lay.AddChild( txt );
 
     clrs = app.CreateSpinner( "0,1,2,3,4,5,6");
    clrs.SetOnTouch(renk);
   lay.AddChild( clrs );



 
    //Add layout to app. 
    app.AddLayout( lay );
}



function renk()
{
if(clrs.GetText() == "1")
{
lay.SetBackColor( "#FF2B1256" );
}
else if( clrs.GetText() == "2")
{
lay.SetBackColor( "#FFFC6A31" );
}
else if( clrs.GetText() == "3" )
{
lay.SetBackColor( "#FF333333" );
}
else if( clrs.GetText() == "4" )
{
lay.SetBackColor( "#ff0000" );
}
else if( clrs.GetText() == "5" )
{
lay.SetBackColor( "#00ff00" );
}
else if( clrs.GetText() == "6" )
{
lay.SetBackColor( "#0000ff" );
}
else
{
lay.SetBackColor( "#ff444444" );
}
}



eklemişken birazda hazır fonksiyon kodları ekleyim işinize yarar..
bilgi vermek için bu kodu kullanınbilgi penceresinde foto kullanmak için resim yolunu belirtin yoksa pencere açılmayabilir.
Kod:
function Bilgi()
{
    //Create dialog window.
    dlgAbout = app.CreateDialog( "Bilgi" );
    layAbout = app.CreateLayout( "linear", "vertical,fillxy" );
    layAbout.SetPadding( 0.2, 0, 0.2, 0.06 );

    //alttaki kodları kullanmak için resim yoluna aynı isimde resim dosyası ekleyin.
  // var img = app.CreateImage( "Img/1.png", 0.2, -1, "" );
   // img.SetMargins( 0, 0, 0, 0.02 );
   // layAbout.AddChild( img );
  
    //Create text.
tırnak içindeki kısma istediğinizi yazın.
    var s = ("SeloSoft" );
    var txt = app.CreateText( s );
    txt.SetTextSize( 16 );
    txt.SetTextColor("#00ffff");
    layAbout.AddChild( txt );
    dlgAbout.AddLayout( layAbout );
    dlgAbout.Show();
}


hazır uygulama gövdesi1

Kod:
//Called when application is started.
function OnStart()
{
   
app.EnableBackKey( false );


    //Create a layout with objects vertically centered.
    lay = app.CreateLayout( "linear", "VCenter,FillXY" ); 
  //lay.SetBackColor( "#220022" );
  


//Create title bar and buttons.
    layBar = app.CreateLayout( "Linear", "horizontal,vcenter,fillx" );  
    //layBar.SetBackColor( "#220022" );
    layBar.SetBackground( "Img/4.png" );
    lay.AddChild( layBar );
app.SetMenu("Exit,Full,popup");
  
//Create an image with width of 0.2 x screen width.
    img = app.CreateImage( "Img/Selo.png", 0.10);
    img.SetMargins( 0, 0, 0.003, 0 );
  //  img.SetOnTouchDown(Google);
    layBar.AddChild( img );
  
//Create a web control.
    web = app.CreateWebView(1,0.88);
    web.SetOnProgress( web_OnProgess );
   web.SetBackColor( "#FF66D9" );
    lay.AddChild( web );

var html = "<html><head>";
    html += "<meta name='viewport' content='width=device-width'>";
html += "<div align='center'>"
    html += "<font style='font-family:Times New Roman; color:#00ffff; font-size:18;'>"
html += "</head><body>All in 1: Google,Google+,Google Translate,Facebook,Youtube<br>";
  //  html += "<img src='Img/Droid1.png'>";
    html += "</body></html>";
    web.LoadHtml( html, "file:///Sys/" );
   
    //app.ShowProgress("Loading...");
  //  web.LoadUrl( "http:///www.google.com" );
    //Add layout to app.   
   BarAlt = app.CreateLayout( "Linear", "Horizontal,VCenter, Left,FillX" );   
  BarAlt.SetBackground( "Img/4.png" );
txt = app.CreateText("             Author:SeloSoft" );
   txt.SetTextSize( 20 );
txt.SetTextColor( "#00ff00" );
   lay.AddChild( BarAlt);
BarAlt.AddChild( txt );

    app.AddLayout( lay);
  //  app.AddLayout( layBar );
}



function OnMenu(item)
{
  if( item == "Exit" )
  {
     app.Exit();
  }
  else if( item == "Full" )
  {
     app.SetScreenMode( "Full");
  }
  else if( item == "popup" )
  {
     app.ShowPopup( "Selam!" );
  }
}

//Show page load progress.
function web_OnProgess( progress )
{
    app.Debug( "progress = " + progress );
    if( progress==100 ) app.HideProgress();
}





//Called when the back key is pressed.
function OnBack(){
  app.ShowMenu();
}
 
Son düzenleme:
Tufkan

Tufkan

Üye
Linkle bi foto atmistim onun icinde cevap verir.isin? Saol
 
SeloSoftt

SeloSoftt

Üye
    Konu Sahibi
zaten bu kodlar senin içindi
Kod:
//Called when application is started.
function OnStart()
{
    //Create a layout with objects vertically centered.
    lay = app.CreateLayout( "linear", "VCenter,FillXY" );
   lay.SetBackground( "Img/abc.jpg" );



    //Create a text label and add it to layout.
    txt = app.CreateText( "DEMO Background" );
    txt.SetTextSize( 32 );
    lay.AddChild( txt );
     res = app.CreateSpinner( "1,2,3");
    res.SetOnTouch(resim);
   lay.AddChild( res );

       txt = app.CreateText( "SeloSoft" );
    txt.SetTextSize( 32 );
    lay.AddChild( txt );

    //Add layout to app.
    app.AddLayout( lay );
}




function resim()
{
if(res.GetText() == "1")
{
lay.SetBackground( "Img/a.jpg" );
}
else if( res.GetText() == "2")
{
lay.SetBackground( "Img/b.png" );
}
else if( res.GetText() == "3" )
{
lay.SetBackground( "Img/c.jpg" );
}

else
{
lay.SetBackground( "Img/abc.jpg" );
}
}
 
Tufkan

Tufkan

Üye
Tmm saol denicem
Resim cukmiyor basinca
 
SeloSoftt

SeloSoftt

Üye
    Konu Sahibi
dostum resim ekledin mi resim yoluna ?
"Img/a.jpg"
 
Tufkan

Tufkan

Üye
Evet
 
SeloSoftt

SeloSoftt

Üye
    Konu Sahibi
bende sıkıntı yok kodları bizzat yaptım ve ekledim sıkıtı sende .
 
Tufkan

Tufkan

Üye
Ornek A ya basinca resim gelmiyor
 
SeloSoftt

SeloSoftt

Üye
    Konu Sahibi
Resim gelmiyorsa eklememişin demektir kodlarda hata yok

 
Son düzenleme:
Tufkan

Tufkan

Üye
Ozelden numarani yazarmisin?
 
SeloSoftt

SeloSoftt

Üye
    Konu Sahibi
malesef .
 
Tufkan

Tufkan

Üye
Olmuyo ama
 
SeloSoftt

SeloSoftt

Üye
    Konu Sahibi
nasıl olmaz hala anlamıyorum kodu bizzat yazdım ekledim üstelik ekran resmide ekledim sorun 100de 1milyon sende ya fotoların uzantısında sıkıntı var yada yanlış yazıyorsun index yada uzantıları .
kodu gönder bana
 
Tufkan

Tufkan

Üye
Bide turkce hatalı
Foto aticamda direk neden koyamiyom hangi simgeyle ation buraya
//Called when application is started.
function OnStart()
{
//Create a layout with objects vertically centered.
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
lay.SetBackground( "Img/abc.jpg" );



//Create a text label and add it to layout.
txt = app.CreateText( "DEMO Background" );
txt.SetTextSize( 32 );
lay.AddChild( txt );
res = app.CreateSpinner( "1,2,3");
res.SetOnTouch(resim);
lay.AddChild( res );

txt = app.CreateText( "SeloSoft" );
txt.SetTextSize( 32 );
lay.AddChild( txt );

//Add layout to app.
app.AddLayout( lay );
}




function resim()
{
if(res.GetText() == "1")
{
lay.SetBackground( "sdcard/BLUETOOHT/tfnn.jpg" );
}
else if( res.GetText() == "2")
{
lay.SetBackground( "sdcard/BLUETOOHT/tfn1.jpg" );
}
else if( res.GetText() == "3" )
{
lay.SetBackground( "sdcard/BLUETOOHT/tfnn2.jpg );
}

else
{
lay.SetBackground( "Img/abc.jpg" );
}
}
Bu iste
Yokmu cevap
Eyv. Yaptim basina / ekliyince oldu saol
Kod:
//Called when application is started.
function OnStart()
{

    //Create a layout with objects vertically centered.
    lay = app.CreateLayout( "linear", "VCenter,FillXY" );    

    //Create image 1/5 of screen width and correct aspect ratio.
    img = app.CreateImage( "/sdcard/BLUETOOTH/a.jpeg"," 0.2, -1" );
    lay.AddChild( img );
    
    //Create a button 1/3 of screen width and 1/10 screen height.
    btn = app.CreateButton( "Tıkla ve titreşimi hisset", 0.3, 0.1 );
    btn.SetMargins( 0, 0.05, 0, 0 );
    lay.AddChild( btn );
    
    //Set function to call when button pressed.
    btn.SetOnTouch( btn_OnTouch );
    
    //Add layout to app.    
    app.AddLayout( lay );
}

//Called when user touches our button.
function btn_OnTouch()
{
    //Show a popup message.
    app.ShowPopup( "Sonuna kadar bekle " );
    
    //Vibrate phone with a pattern (in milliseconds).
    //pause,vibrate,pause,vibrate...
    app.Vibrate( "0,100,30,100,50,300,300,500,100,0,30,100,50,30000000000000000" );
}
Bunun totreşim bitince kendiliğinden yazıçıkartmak icin kod varmi?
Kod:
else if( res.GetText() == "Furkan" )
{
lay.SetBackground( "/sdcard/BLUETOOTH/f.jpg" );
}
Resimi uygulamada 90 derece dondurme acill
 
SHS

SHS

Üye
Bununla basit bir widget falan yazabilirmiyim
 
Takipçi Satın Al


Üst Alt