Changeset 14443
- Timestamp:
- 03/11/13 20:33:04 (12 years ago)
- Location:
- issm/trunk-jpl/src/mobile/android/ISSM
- Files:
-
- 5 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/mobile/android/ISSM/AndroidManifest.xml
r14350 r14443 12 12 android:label="@string/app_name" 13 13 android:theme="@style/AppTheme" > 14 <activity android:name="gov.nasa.jpl.issm. SplashScreen"14 <activity android:name="gov.nasa.jpl.issm.ISSMAPP" 15 15 android:label="@string/title_activity_issm" > 16 16 <intent-filter> -
issm/trunk-jpl/src/mobile/android/ISSM/bin/AndroidManifest.xml
r14350 r14443 12 12 android:label="@string/app_name" 13 13 android:theme="@style/AppTheme" > 14 <activity android:name="gov.nasa.jpl.issm. SplashScreen"14 <activity android:name="gov.nasa.jpl.issm.ISSMAPP" 15 15 android:label="@string/title_activity_issm" > 16 16 <intent-filter> -
issm/trunk-jpl/src/mobile/android/ISSM/res/layout/issmcore.xml
r14350 r14443 7 7 android:orientation="horizontal" 8 8 android:background="@drawable/background" > 9 <TextView10 android:id="@+id/friction"11 android:layout_width="wrap_content"12 android:layout_height="wrap_content"13 android:layout_alignParentLeft="true"14 android:layout_alignParentTop="true"15 android:textSize="15sp"16 android:typeface="serif"17 android:textColor="#f49956"18 android:text="Friction" />19 9 20 <TextView21 android:id="@+id/value"22 android:layout_width="wrap_content"23 android:layout_height="wrap_content"24 android:layout_alignParentLeft="true"25 android:layout_below="@+id/friction"26 android:typeface="serif"27 android:textColor="#FF0000"28 android:text="100%" />29 30 <gov.nasa.jpl.issm.VerticalSeekBar31 android:id="@+id/seekbar"32 android:layout_width="wrap_content"33 android:layout_height="300dp"34 android:layout_above="@+id/back"35 android:layout_marginBottom="50dp"36 android:max="490"37 android:progress="100"38 android:progressDrawable="@layout/seekbar_progress"39 android:thumb="@drawable/thumb" />40 10 41 11 <FrameLayout … … 44 14 android:layout_height="wrap_content" 45 15 android:layout_above="@+id/solve" 46 android:layout_below="@+id/value" 47 android:layout_marginLeft="30dp" 16 android:layout_below="@+id/back" 48 17 android:layout_marginBottom="12dp" > 49 18 </FrameLayout> 50 19 20 <Button 21 android:id="@+id/solve" 22 android:layout_width="wrap_content" 23 android:layout_height="wrap_content" 24 android:layout_alignParentBottom="true" 25 android:layout_alignParentLeft="true" 26 android:layout_marginLeft="20dp" 27 android:layout_marginBottom="18dp" 28 android:background="@drawable/btn_lightblue_glossy" 29 android:text="Solve" /> 30 31 <Button 32 android:id="@+id/setting" 33 android:layout_width="wrap_content" 34 android:layout_height="wrap_content" 35 android:layout_alignParentRight="true" 36 android:layout_below="@+id/frame" 37 android:layout_marginRight="20dp" 38 android:background="@drawable/btn_lightblue_glossy" 39 android:text="Settings" /> 51 40 52 41 <Button … … 54 43 android:layout_width="wrap_content" 55 44 android:layout_height="wrap_content" 56 android:layout_alignParentBottom="true"57 45 android:layout_alignParentLeft="true" 58 android:layout_marginBottom="17dp" 59 android:background="@drawable/btn_lightblue_glossy" 60 android:text="Back"/> 61 62 <Button 63 android:id="@+id/solve" 64 android:layout_width="wrap_content" 65 android:layout_height="wrap_content" 66 android:layout_alignBaseline="@+id/back" 67 android:layout_alignBottom="@+id/back" 68 android:layout_marginLeft="14dp" 69 android:layout_toRightOf="@+id/back" 70 android:background="@drawable/btn_lightblue_glossy" 71 android:text="Solve"/> 46 android:layout_alignParentTop="true" 47 android:background="@drawable/back_button"/> 72 48 73 49 </RelativeLayout> -
issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ISSM.java
r14350 r14443 9 9 import android.app.Activity; 10 10 import android.app.ProgressDialog; 11 import android.view.Gravity; 12 import android.view.LayoutInflater; 11 13 import android.view.Menu; 12 14 import android.view.MenuInflater; … … 20 22 import android.widget.FrameLayout; 21 23 import android.widget.ImageButton; 24 import android.widget.PopupWindow; 22 25 import android.widget.SeekBar; 23 26 import android.widget.SeekBar.OnSeekBarChangeListener; … … 36 39 private GLSurfaceView mGLView; 37 40 private FrameLayout frame; 38 private VerticalSeekBar bar;39 private TextView value;40 41 private ColorMap colorMap; 41 private int alpha;42 private int friction,temperature,sealevel; 42 43 private final int MINIMUM = 90; 43 44 private final int OFFSET = 10; … … 63 64 } 64 65 } 65 alpha = MINIMUM + OFFSET; 66 friction = MINIMUM + OFFSET; 67 temperature = MINIMUM + OFFSET; 68 sealevel = MINIMUM + OFFSET; 66 69 frame = (FrameLayout)findViewById(R.id.frame); 67 70 viewflipper = (ViewFlipper) findViewById(R.id.flipper); 68 this.bar = (VerticalSeekBar) findViewById(R.id.seekbar);69 this.value = (TextView) super.findViewById(R.id.value);70 71 Button solve = (Button) super.findViewById(R.id.solve); 71 72 solve.setOnClickListener(this); 72 73 Button back = (Button) super.findViewById(R.id.back); 73 74 back.setOnClickListener(this); 75 Button setting = (Button) super.findViewById(R.id.setting); 76 setting.setOnClickListener(this); 74 77 ImageButton gl = (ImageButton) findViewById(R.id.greenland); 75 78 gl.setOnClickListener(this); 76 79 ImageButton art = (ImageButton) findViewById(R.id.antarctica); 77 80 art.setOnClickListener(this); 78 bar.setOnSeekBarChangeListener(new OnSeekBarChangeListener()79 {80 public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser)81 {82 83 alpha = progress + OFFSET;84 value.setText("" + alpha + "%");85 }86 87 @Override88 public void onStartTrackingTouch(SeekBar seekBar) {}89 90 @Override91 public void onStopTrackingTouch(SeekBar seekBar) {}92 });93 81 94 82 //load up the ISSM library and create double buffer in java … … 198 186 199 187 } 200 //201 202 188 //--------------------------------------------------------------------------------- 203 189 public void onClick(View view) … … 241 227 dialog.setProgress(0); 242 228 dialog.setMax(100); 243 new CalculationTask().execute(alpha); 229 System.out.println(friction); 230 new CalculationTask().execute(friction); 244 231 break; 232 } 233 case R.id.setting: 234 { 235 final SliderMenu sliders= new SliderMenu(this); 236 final PopupWindow popupWindow = new PopupWindow( sliders, 400,300, true); 237 popupWindow.showAtLocation(sliders, Gravity.CENTER, 0, 0); 238 Button dismiss = (Button)sliders.findViewById(R.id.exitSetting); 239 dismiss.setOnClickListener(new Button.OnClickListener() 240 { 241 public void onClick(View v) 242 { 243 friction = sliders.getFric(); 244 temperature = sliders.getTemp(); 245 sealevel = sliders.getSea(); 246 popupWindow.dismiss(); 247 System.out.println("Friction = " + friction ); 248 System.out.println("Temp =" + temperature); 249 System.out.println("SeaLevel" + sealevel); 250 } 251 }); 245 252 } 246 253 } … … 252 259 mGLView = new MyGLSurfaceView(this, buff, size, colorMap); 253 260 frame.addView(mGLView); 254 //frame.addView(colorBar);255 261 } 256 262 //------------------------------------------------------------------------------------ -
issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/IssmJni.java
r14370 r14443 8 8 static 9 9 { 10 System.loadLibrary("I SSMJNI");10 System.loadLibrary("IssmJni"); 11 11 } 12 12 }
Note:
See TracChangeset
for help on using the changeset viewer.