Changeset 14443


Ignore:
Timestamp:
03/11/13 20:33:04 (12 years ago)
Author:
ltnguyen
Message:

change to package name, fix slider and allow multiple sliders as seperate UI component. Modify buttons, look, and location

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  
    1212        android:label="@string/app_name"
    1313        android:theme="@style/AppTheme" >
    14         <activity android:name="gov.nasa.jpl.issm.SplashScreen"
     14        <activity android:name="gov.nasa.jpl.issm.ISSMAPP"
    1515                  android:label="@string/title_activity_issm" >
    1616            <intent-filter>
  • issm/trunk-jpl/src/mobile/android/ISSM/bin/AndroidManifest.xml

    r14350 r14443  
    1212        android:label="@string/app_name"
    1313        android:theme="@style/AppTheme" >
    14         <activity android:name="gov.nasa.jpl.issm.SplashScreen"
     14        <activity android:name="gov.nasa.jpl.issm.ISSMAPP"
    1515                  android:label="@string/title_activity_issm" >
    1616            <intent-filter>
  • issm/trunk-jpl/src/mobile/android/ISSM/res/layout/issmcore.xml

    r14350 r14443  
    77    android:orientation="horizontal"
    88    android:background="@drawable/background" >
    9       <TextView
    10         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" />
    199     
    20       <TextView
    21         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.VerticalSeekBar
    31         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" />
    4010     
    4111    <FrameLayout
     
    4414        android:layout_height="wrap_content"
    4515        android:layout_above="@+id/solve"
    46         android:layout_below="@+id/value"
    47         android:layout_marginLeft="30dp"
     16        android:layout_below="@+id/back"
    4817        android:layout_marginBottom="12dp" >
    4918    </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" />
    5140
    5241    <Button
     
    5443        android:layout_width="wrap_content"
    5544        android:layout_height="wrap_content"
    56         android:layout_alignParentBottom="true"
    5745        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"/>
    7248
    7349</RelativeLayout>
  • issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/ISSM.java

    r14350 r14443  
    99import android.app.Activity;
    1010import android.app.ProgressDialog;
     11import android.view.Gravity;
     12import android.view.LayoutInflater;
    1113import android.view.Menu;
    1214import android.view.MenuInflater;
     
    2022import android.widget.FrameLayout;
    2123import android.widget.ImageButton;
     24import android.widget.PopupWindow;
    2225import android.widget.SeekBar;
    2326import android.widget.SeekBar.OnSeekBarChangeListener;
     
    3639    private GLSurfaceView mGLView;
    3740        private FrameLayout frame;
    38         private VerticalSeekBar bar;
    39         private TextView value;
    4041        private ColorMap colorMap;
    41         private int alpha;
     42        private int friction,temperature,sealevel;
    4243        private final int MINIMUM = 90;
    4344        private final int OFFSET = 10;
     
    6364                }
    6465        }
    65         alpha = MINIMUM + OFFSET;
     66        friction = MINIMUM + OFFSET;
     67        temperature = MINIMUM + OFFSET;
     68        sealevel = MINIMUM + OFFSET;
    6669        frame = (FrameLayout)findViewById(R.id.frame);
    6770        viewflipper = (ViewFlipper) findViewById(R.id.flipper);
    68         this.bar  = (VerticalSeekBar) findViewById(R.id.seekbar);
    69         this.value  = (TextView) super.findViewById(R.id.value);
    7071        Button solve = (Button) super.findViewById(R.id.solve);
    7172        solve.setOnClickListener(this);
    7273        Button back = (Button) super.findViewById(R.id.back);
    7374        back.setOnClickListener(this);
     75        Button setting = (Button) super.findViewById(R.id.setting);
     76        setting.setOnClickListener(this);
    7477        ImageButton gl = (ImageButton) findViewById(R.id.greenland);           
    7578                gl.setOnClickListener(this);
    7679                ImageButton art = (ImageButton) findViewById(R.id.antarctica);
    7780                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                     @Override
    88                     public void onStartTrackingTouch(SeekBar seekBar) {}
    89        
    90                     @Override
    91                     public void onStopTrackingTouch(SeekBar seekBar) {}
    92         });
    9381
    9482        //load up the ISSM library and create double buffer in java
     
    198186       
    199187    }
    200 //   
    201    
    202188//---------------------------------------------------------------------------------   
    203189    public void onClick(View view)
     
    241227                        dialog.setProgress(0);
    242228                        dialog.setMax(100);
    243                         new CalculationTask().execute(alpha);
     229                        System.out.println(friction);
     230                        new CalculationTask().execute(friction);
    244231                        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                    });
    245252                }
    246253        }
     
    252259        mGLView = new MyGLSurfaceView(this, buff, size, colorMap);
    253260        frame.addView(mGLView);
    254         //frame.addView(colorBar);
    255261    }
    256262//------------------------------------------------------------------------------------
  • issm/trunk-jpl/src/mobile/android/ISSM/src/gov/nasa/jpl/issm/IssmJni.java

    r14370 r14443  
    88        static
    99        {
    10         System.loadLibrary("ISSMJNI");
     10        System.loadLibrary("IssmJni");
    1111    }
    1212}
Note: See TracChangeset for help on using the changeset viewer.