3 Noob Fragen/Probleme

dbaf14

dbaf14

Fortgeschrittenes Mitglied
23
hallo liebe community ,
Ich habe ein paar Fragen und hoffe man kann mir hier helfen !?


~~1~~
zum einen geht es darum das ich trotz stundenlangem rumprobieren es nicht wirklich geschafft habe
eine ScrollView mit xml-layout in alle richtungen mit diagonalem scrolling hin zu bekommen wie es zB in google-maps geht!
hier mein xml code

Code:
<?xml version="1.0" encoding="utf-8"?>

<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android" android:keepScreenOn="true" android:longClickable="false" android:addStatesFromChildren="true" android:clipChildren="true" android:id="@+id/Battlemode" android:layout_width="wrap_content" android:layout_height="wrap_content">
<AbsoluteLayout android:id="@+id/menu_top" android:background="@drawable/menu_top" android:layout_width="wrap_content" android:layout_height="22px">
</AbsoluteLayout><ScrollView android:id="@+id/ScrollView01" android:layout_width="wrap_content" android:scrollbars="horizontal|vertical" android:layout_height="wrap_content" android:layout_y="20px" android:alwaysDrawnWithCache="true" android:animationCache="true">
<HorizontalScrollView android:id="@+id/HorizontalScrollView01" android:layout_height="fill_parent" android:layout_width="wrap_content" android:alwaysDrawnWithCache="true" android:animationCache="true">
<LinearLayout android:id="@+id/LinearLayout02" android:layout_width="wrap_content" android:layout_height="fill_parent" android:orientation="horizontal" android:alwaysDrawnWithCache="true" android:animationCache="true">
<ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/map_metro_bg"></ImageView>
</LinearLayout>
</HorizontalScrollView>
</ScrollView><AbsoluteLayout android:id="@+id/menu_bottom" android:layout_width="480px" android:layout_y="260px" android:background="#ff0000" android:layout_height="40px"><LinearLayout android:id="@+id/LinearLayout01" android:layout_width="wrap_content" android:background="@drawable/menu_buttom" android:layout_height="40px"></LinearLayout>
</AbsoluteLayout>
</AbsoluteLayout>

ist das vielleicht nur per code möglich ?

~~2~~
Das nächste Problem ist das ich dann irgendwie nichts mehr in das layout welches sich in dem ScollView befindet
anzeigen lassen kann, :( ( Tut uns leid , blah & keks)

mein xml code

Code:
<?xml version="1.0" encoding="utf-8"?>

<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android" android:keepScreenOn="true" android:longClickable="false" android:addStatesFromChildren="true" android:clipChildren="true" android:id="@+id/Battlemode" android:layout_width="wrap_content" android:layout_height="wrap_content">
<AbsoluteLayout android:id="@+id/menu_top" android:background="@drawable/menu_top" android:layout_width="wrap_content" android:layout_height="22px">
</AbsoluteLayout><ScrollView android:id="@+id/ScrollView01" android:layout_width="wrap_content" android:scrollbars="horizontal|vertical" android:layout_height="wrap_content" android:layout_y="20px" android:alwaysDrawnWithCache="true" android:animationCache="true">

<HorizontalScrollView android:id="@+id/HorizontalScrollView01" android:layout_height="fill_parent" android:layout_width="wrap_content" android:alwaysDrawnWithCache="true" android:animationCache="true">
<LinearLayout android:id="@+id/LinearLayout02" android:layout_width="wrap_content" android:layout_height="fill_parent" android:orientation="horizontal" android:alwaysDrawnWithCache="true" android:animationCache="true">

<ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/map_metro_bg"></ImageView>
<AbsoluteLayout android:id="@+id/AbsoluteLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/metro_land"></AbsoluteLayout>
</LinearLayout>
</HorizontalScrollView>
</ScrollView><AbsoluteLayout android:id="@+id/menu_bottom" android:layout_width="480px" android:layout_y="260px" android:background="#ff0000" android:layout_height="40px"><LinearLayout android:id="@+id/LinearLayout01" android:layout_width="wrap_content" android:background="@drawable/menu_buttom" android:layout_height="40px"></LinearLayout>
</AbsoluteLayout>

</AbsoluteLayout>

geht das vielleicht wieder nur per code?

~~3~~
bei animationen müsste es doch eigendlich möglich sein diese zu spiegeln oder?
ich hab mich schon echt dumm und dämlich gesucht und kann echt nichts finden,,

hab die frame by frame Methode zum abspielen genutzt und es klappt auch alles wunderbar

mein code

Code:
ImageView img = (ImageView)findViewById(R.id.ImageView01);
        img.setBackgroundResource(R.drawable.thor_normal);
        
        thorAnimation mar = new thorAnimation();
        
        Timer t = new Timer(false);
        t.schedule(mar, 100);
        
	 }

	   class thorAnimation extends TimerTask
	   {
	   thorAnimation()
	   {
	   }

	   public void run()
	   {
	   ImageView img = (ImageView)findViewById(R.id.ImageView01);
	   // Get the background, which has been compiled to an AnimationDrawable object.
	   AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground();

	   // Start the animation (looped playback by default).
	   frameAnimation.start();
	   }
	   }



danke schonmal im vorraus ^^

mfg dbaf14
 

Ähnliche Themen

S
Antworten
4
Aufrufe
956
Sempervivum
S
R
Antworten
3
Aufrufe
1.571
Ritartet
R
koje71
Antworten
1
Aufrufe
912
swa00
swa00
Zurück
Oben Unten