Skip to content

Commit

Permalink
Fixed the new features.
Browse files Browse the repository at this point in the history
  • Loading branch information
w9jds committed Apr 16, 2014
1 parent a6b7b21 commit ae8bc6f
Show file tree
Hide file tree
Showing 30 changed files with 261 additions and 182 deletions.
374 changes: 194 additions & 180 deletions .idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.w9jds.gallery4glass"
android:versionCode="19"
android:versionName="0.5.0-beta">
android:versionCode="20"
android:versionName="0.5.1-beta">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
Expand Down
Binary file modified Gallery4Glass.apk
Binary file not shown.
Binary file modified out/production/Gallery4Glass/Gallery4Glass.apk
Binary file not shown.
Binary file modified out/production/Gallery4Glass/Gallery4Glass.unaligned.apk
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified out/production/Gallery4Glass/com/w9jds/gallery4glass/R$xml.class
Binary file not shown.
Binary file modified out/production/Gallery4Glass/com/w9jds/gallery4glass/R.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions res/menu/camera_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
android:id="@+id/white_balance_menu_item"
android:title="@string/white_balance_label"/>

<!--<item-->
<!--android:id="@+id/color_effect_menu_item"-->
<!--android:title="@string/color_effect_label"/>-->

</menu>
1 change: 1 addition & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<string name="share_label">Share</string>
<string name="scene_label">Set Scene Mode</string>
<string name="white_balance_label">Set White Balance</string>
<string name="color_effect_label">Set Color Effect</string>

<integer name="google_play_services_version">4242000</integer>

Expand Down
60 changes: 60 additions & 0 deletions src/com/w9jds/gallery4glass/CameraActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public class CameraActivity extends Activity implements CameraBridgeViewBase.CvC
{
public static final String ACTION_WINK = "com.google.glass.action.EYE_GESTURE";


public static String msColorEffect = Camera.Parameters.EFFECT_NONE;
//create an adapter for the cardscrollviewer
private csaAdapter mcvAdapter;
// Declare a new Gesture Detector
Expand Down Expand Up @@ -136,6 +138,8 @@ public void run()
Camera.Parameters cParams = cCamera.getParameters();

cParams.setSceneMode(lsScenes.get(position));

cCamera.setParameters(cParams);
}
}, 2000);

Expand Down Expand Up @@ -185,6 +189,8 @@ public void run()
Camera.Parameters cParams = cCamera.getParameters();

cParams.setWhiteBalance(lsWhites.get(position));

cCamera.setParameters(cParams);
}
}, 2000);

Expand All @@ -196,6 +202,60 @@ public void run()

return true;

// case R.id.color_effect_menu_item:
//
// cCamera = mPreviewSurface.getCamera();
//
// params = cCamera.getParameters();
// mPreviewSurface.disableView();
//
// //add a card to the card scroll view for each supported Scenes that is available
// final List<String> lsEffects = params.getSupportedColorEffects();
//
// //create a new card scroll viewer for this context
// csvCardsView = new CardScrollView(this);
// //create a new adapter for the scroll viewer
// mcvAdapter = new csaAdapter(this, (ArrayList<String>)lsEffects);
// //set this adapter as the adapter for the scroll viewer
// csvCardsView.setAdapter(mcvAdapter);
// //activate this scroll viewer
// csvCardsView.activate();
// //add a listener to the scroll viewer that is fired when an item is clicked
// csvCardsView.setOnItemClickListener(new AdapterView.OnItemClickListener()
// {
// @Override
// public void onItemClick(AdapterView<?> parent, View view, final int position, long id)
// {
//
// //play the tap sound
// maManager.playSoundEffect(Sounds.TAP);
//
// setPreviewSurface();
//
// new Handler().postDelayed(new Runnable()
// {
// public void run()
// {
// Camera cCamera = mPreviewSurface.getCamera();
//
// Camera.Parameters cParams = cCamera.getParameters();
//
// cParams.setColorEffect(lsEffects.get(position));
//
// cCamera.setParameters(cParams);
// cCamera.startPreview();
//
// }
// }, 1000);
//
// }
// });
//
// //set the view of this activity
// setContentView(csvCardsView);
//
// return true;

default:
return super.onOptionsItemSelected(iItem);
}
Expand Down

0 comments on commit ae8bc6f

Please sign in to comment.