Kişisel Sayfaları
İlgi Alanları
İş Tecrubesi
Eğitim Geçmişi
Sertifikalar & Başarılar
Kullanıcıya ait test sonucu bulunmamaktadır.
Dil Becerileri
Son Forum Aktiviteleri
6Andengine Body ve Sprite yerleşimi
Arkadaşlar merhaba andegnine ile oyun geliştiriyorum fakat Body'i Sprite'ı merkezine alacak biçimde yerleştiremedim. Daha dogru anlatabilmek için sorunumu birde resim ekledim. Yardımcı olursanız sevinirim.
body = PhysicsFactory.createPolygonBody(physicsWorld, this, verticesDown, BodyType.DynamicBody, PhysicsFactory.createFixtureDef(0, 0, 0));
body.setUserData("player");
this.setScaleCenter(0,0);
float x=this.getHeight();
float y = this.getWidth();
body.setFixedRotation(true);
physicsWorld.registerPhysicsConnector(new PhysicsConnector(this, body, true, false)
{
@Override
public void onUpdate(float pSecondsElapsed)
{
super.onUpdate(pSecondsElapsed);
camera.onUpdate(0.0f);
if (getY() <= -84)
{
onDie();
}
if (getY() >= +564)
{
onDie();
}
if (canRun)
{
body.setLinearVelocity(new Vector2(5, body.getLinearVelocity().y));
}
}
});
Activty geçişinde zaman zaman hata alıyorum
Arkadaşlar merhaba şimdilik arka arkaya 6 tane Activity geçişi ayarladım. Geçişleri yaparken uygulama durdu hatası alıyorum. Özellikle hızlı geçişler yaptığımda alıyorum bu hatayı. Bana göre yanlış yaptığım bi yer yok. Activity geçişini button vasıtasıyla yapıyorum vede butona tıklandığı zaman diğer Activity'e veri gönderiyorum Google Play'e skor gönderiyorum ve Random kullanarak rastgele Activty geçişi yapıyorum. Acaba butona atadığım görev fazla olduğundan mı bu hatayı alıyorum. Yardımcı olursanız çok sevinirim.
Rastgele Activity Geçişi
Arkadaşlar herkese merhaba. Bilgi yarışması uygulaması yapıyorum vede Activity'ler arasında geçiş yaparken zaman zaman BG ( BG uygulama adı) durdu hatası alıyorum.Aşağıdaki kodu eklemeden yani Rastgele Activity geçişi eklemeden önce bu hatayı almıyordum. Acaba nerede hata yapıyorum ?
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Random rnd1 = new Random();
int x=rnd1.nextInt(4);
Intent myIntent = new Intent();
switch(x){
case 1:
myIntent.setClass(KKK1.this, KK1.class);
break;
case 2:
myIntent.setClass(KKK1.this, KK2.class);
break;
case 3:
myIntent.setClass(KKK1.this, KK3.class);
break;
case 4:
myIntent.setClass(KKK1.this, KK4.class);
break;
}
startActivity(myIntent);
LOG
04-19 10:59:00.272: I/dalvikvm(1464): Could not find method android.view.ViewGroup.onNestedScrollAccepted, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onNestedScrollAccepted
04-19 10:59:00.332: W/dalvikvm(1464): VFY: unable to resolve virtual method 11349: Landroid/view/ViewGroup;.onNestedScrollAccepted (Landroid/view/View;Landroid/view/View;I)V
04-19 10:59:00.332: D/dalvikvm(1464): VFY: replacing opcode 0x6f at 0x0000
04-19 10:59:00.342: I/dalvikvm(1464): Could not find method android.view.ViewGroup.onStopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onStopNestedScroll
04-19 10:59:00.342: W/dalvikvm(1464): VFY: unable to resolve virtual method 11355: Landroid/view/ViewGroup;.onStopNestedScroll (Landroid/view/View;)V
04-19 10:59:00.342: D/dalvikvm(1464): VFY: replacing opcode 0x6f at 0x0000
04-19 10:59:00.352: I/dalvikvm(1464): Could not find method android.support.v7.internal.widget.ActionBarOverlayLayout.stopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.setHideOnContentScrollEnabled
04-19 10:59:00.352: W/dalvikvm(1464): VFY: unable to resolve virtual method 9043: Landroid/support/v7/internal/widget/ActionBarOverlayLayout;.stopNestedScroll ()V
04-19 10:59:00.362: D/dalvikvm(1464): VFY: replacing opcode 0x6e at 0x000e
04-19 10:59:00.572: I/dalvikvm(1464): Could not find method android.view.ViewGroup.onRtlPropertiesChanged, referenced from method android.support.v7.widget.Toolbar.onRtlPropertiesChanged
04-19 10:59:00.582: W/dalvikvm(1464): VFY: unable to resolve virtual method 11352: Landroid/view/ViewGroup;.onRtlPropertiesChanged (I)V
04-19 10:59:00.582: D/dalvikvm(1464): VFY: replacing opcode 0x6f at 0x0007
04-19 10:59:00.642: I/dalvikvm(1464): Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
04-19 10:59:00.642: W/dalvikvm(1464): VFY: unable to resolve virtual method 366: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
04-19 10:59:00.651: D/dalvikvm(1464): VFY: replacing opcode 0x6e at 0x0002
04-19 10:59:00.662: I/dalvikvm(1464): Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
04-19 10:59:00.662: W/dalvikvm(1464): VFY: unable to resolve virtual method 388: Landroid/content/res/TypedArray;.getType (I)I
04-19 10:59:00.672: D/dalvikvm(1464): VFY: replacing opcode 0x6e at 0x0002
04-19 10:59:01.562: D/dalvikvm(1464): GC_CONCURRENT freed 209K, 9% free 5424K/5959K, paused 23ms+13ms, total 65ms
04-19 10:59:02.452: I/Choreographer(1464): Skipped 1031 frames! The application may be doing too much work on its main thread.
04-19 10:59:02.472: D/gralloc_goldfish(1464): Emulator without GPU emulation detected.
04-19 10:59:17.162: I/Choreographer(1464): Skipped 38 frames! The application may be doing too much work on its main thread.
04-19 10:59:18.932: I/Choreographer(1464): Skipped 42 frames! The application may be doing too much work on its main thread.
04-19 10:59:24.502: I/Choreographer(1464): Skipped 37 frames! The application may be doing too much work on its main thread.
04-19 10:59:28.912: I/Choreographer(1464): Skipped 40 frames! The application may be doing too much work on its main thread.
04-19 10:59:30.471: D/dalvikvm(1464): GC_CONCURRENT freed 98K, 8% free 5731K/6215K, paused 16ms+4ms, total 46ms
04-19 10:59:30.561: I/Choreographer(1464): Skipped 45 frames! The application may be doing too much work on its main thread.
04-19 10:59:30.641: I/Choreographer(1464): Skipped 44 frames! The application may be doing too much work on its main thread.
04-19 10:59:32.032: I/Choreographer(1464): Skipped 33 frames! The application may be doing too much work on its main thread.
04-19 10:59:34.052: I/Choreographer(1464): Skipped 30 frames! The application may be doing too much work on its main thread.
04-19 10:59:34.092: I/Choreographer(1464): Skipped 38 frames! The application may be doing too much work on its main thread.
04-19 10:59:35.782: I/Choreographer(1464): Skipped 51 frames! The application may be doing too much work on its main thread.
04-19 10:59:41.082: I/Choreographer(1464): Skipped 37 frames! The application may be doing too much work on its main thread.
04-19 10:59:42.592: I/Choreographer(1464): Skipped 45 frames! The application may be doing too much work on its main thread.
04-19 10:59:42.782: I/Choreographer(1464): Skipped 35 frames! The application may be doing too much work on its main thread.
04-19 10:59:44.302: I/Choreographer(1464): Skipped 35 frames! The application may be doing too much work on its main thread.
04-19 10:59:46.032: D/dalvikvm(1464): GC_CONCURRENT freed 97K, 8% free 6052K/6535K, paused 2ms+55ms, total 102ms
04-19 10:59:46.102: I/Choreographer(1464): Skipped 136 frames! The application may be doing too much work on its main thread.
04-19 10:59:49.662: I/Choreographer(1464): Skipped 266 frames! The application may be doing too much work on its main thread.
04-19 10:59:49.723: D/AndroidRuntime(1464): Shutting down VM
04-19 10:59:49.723: W/dalvikvm(1464): threadid=1: thread exiting with uncaught exception (group=0xb3e27288)
04-19 10:59:49.752: E/AndroidRuntime(1464): FATAL EXCEPTION: main
04-19 10:59:49.752: E/AndroidRuntime(1464): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.turan.bg/com.turan.bg.KK3}: java.lang.NullPointerException
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread.access$600(ActivityThread.java:130)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.os.Handler.dispatchMessage(Handler.java:99)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.os.Looper.loop(Looper.java:137)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread.main(ActivityThread.java:4745)
04-19 10:59:49.752: E/AndroidRuntime(1464): at java.lang.reflect.Method.invokeNative(Native Method)
04-19 10:59:49.752: E/AndroidRuntime(1464): at java.lang.reflect.Method.invoke(Method.java:511)
04-19 10:59:49.752: E/AndroidRuntime(1464): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
04-19 10:59:49.752: E/AndroidRuntime(1464): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
04-19 10:59:49.752: E/AndroidRuntime(1464): at dalvik.system.NativeStart.main(Native Method)
04-19 10:59:49.752: E/AndroidRuntime(1464): Caused by: java.lang.NullPointerException
04-19 10:59:49.752: E/AndroidRuntime(1464): at com.turan.bg.KK3.onCreate(KK3.java:33)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.Activity.performCreate(Activity.java:5008)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
04-19 10:59:49.752: E/AndroidRuntime(1464): ... 11 more
04-19 10:59:52.602: E/Trace(1599): error opening trace file: No such file or directory (2)
04-19 10:59:52.863: I/Choreographer(1599): Skipped 38 frames! The application may be doing too much work on its main thread.
04-19 10:59:52.992: I/Choreographer(1599): Skipped 41 frames! The application may be doing too much work on its main thread.
04-19 10:59:53.002: D/gralloc_goldfish(1599): Emulator without GPU emulation detected.
Listview'de Arama yaparken istenilen Layout'a geçmek
Arkadaşlar şu kaynaktan listviewde aramayapmayı buldum ingilizcem iyi seviyede olmadığı içinde az buçuk anlayabildim.
http://thanhcs.blogspot.com.tr/2014/06/android-search-in-listview-custom.html
Şimdi arama çubuğunda birşey yazdığımızda çıkan sonuca tıkladığımızda bizi SubActivity Class'ına ordanda sub_activity layoutuna göneriyor ve ekranda aradığımız metine bağlı olarak yazı yazdırılıyor. Benim istediğim ise Listview'da arama yaptıktan sonra çıkan sonuca göre farklı Class'lara ordanda farklı layoutlara ulaşabilmek. Bunu nasıl yapabilirim yardımcı olursanız sevinirim
EDIT [code] public void onItemClick(AdapterView paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
{
if (paramAnonymousInt == 0)
Marmara.this.startActivity(new Intent(Marmara.this.getActivity(), Ankara.class));
if (paramAnonymousInt == 1)
Marmara.this.startActivity(new Intent(Marmara.this.getActivity(), Bursa.class));
if (paramAnonymousInt == 2)
Marmara.this.startActivity(new Intent(Marmara.this.getActivity(), Balıkesirclass));
}
});[/code]
Aslında demek istediğim şu ben arama çubuguna B yazdığımda direkt olarak Ankara elenicek. Vede 2. ve 3 pozisyonlardaki Balıkesir ve Bursa 1. ve 2. sıraya geçecekler. Bunu engellemek için napabilirim.
Activity'deki ListView'u Fragment'a taşımak
Bir Activiyi'deki Listviev'u Fragment'a nasıl taşırımyardımcı olur musunz. Fragmentta ne resimdeki hataları almam için nasıl bir düzenleme yapmalıyım.
Activity'deki ListView'u Fragment'a taşımak
Teşekkür ederim, sağolun.