diff --git a/.gitignore b/.gitignore index 2fed38d..01e7ab6 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ # generated files gen/ bin/ +target/ # Local configuration file (sdk path, etc) local.properties diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 2f53a1e..d81bdc2 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -33,9 +33,9 @@ + android:theme="@style/Theme.Sherlock.Light.DarkActionBar" > - \ No newline at end of file + diff --git a/mvn-libs-deploy-local b/mvn-libs-deploy-local new file mode 100755 index 0000000..488cb4b --- /dev/null +++ b/mvn-libs-deploy-local @@ -0,0 +1,2 @@ +mvn install:install-file -Dfile=libs/YouTubeAndroidPlayerApi.jar -DgroupId=com.google.android.youtube -DartifactId=player -Dversion=1.0.0 -Dpackaging=jar +mvn install:install-file -Dfile=libs/android-support-v4.jar -DgroupId=com.google.android -DartifactId=support-v4 -Dversion=r11 -Dpackaging=jar diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..4a6d772 --- /dev/null +++ b/pom.xml @@ -0,0 +1,261 @@ + + + 4.0.0 + com.proinlab.gdlapp + gdlapp + 1.0.0 + apk + GoogleDeveloperLive + + + + Alan Jeon + skyisle@gmail.com + skyisle + http://github.com/skyisle + +9 + + developer + + + + + + + Apache License Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + /devel/android-sdk/ + + UTF-8 + UTF-8 + + 1.6 + 4.1.1.4 + 16 + r11 + 3.5.0 + 4.2.0 + + + + + com.google.android + android + ${android.version} + provided + + + + com.google.android + support-v4 + ${android.support.version} + + + + com.google.android.youtube + player + 1.0.0 + + + + + com.actionbarsherlock + actionbarsherlock + ${abs.version} + apklib + + + + + src + test + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + ${java.version} + ${java.version} + + + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + ${android-maven.version} + + + ${android.platform} + + true + + true + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + com.google.code.maven-replacer-plugin + maven-replacer-plugin + [1.4.1,) + + replace + + + + + + + + + + + + + + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + ${android-maven.version} + true + + + org.apache.maven.plugins + maven-eclipse-plugin + 2.9 + + + android:android + com.google.android.maps:maps + + bin + + com.android.ide.eclipse.adt.ANDROID_FRAMEWORK + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.ajdt.ui.ajnature + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + com.android.ide.eclipse.adt.PreCompilerBuilder + org.eclipse.jdt.core.javabuilder + com.android.ide.eclipse.adt.ApkBuilder + + false + + + + + + + release + + + + performRelease + true + + + + + + org.apache.maven.plugins + maven-jarsigner-plugin + 1.2 + + + signing + + sign + verify + + package + true + + true + + ${sign.keystore} + ${sign.alias} + ${sign.storepass} + ${sign.keypass} + true + + + + + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + ${android-maven.version} + true + + + false + + + true + ${project.build.directory}/${project.artifactId}-signed-aligned.apk + + + + false + + + + + alignApk + package + + zipalign + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.7 + + + + ${project.build.directory}/${project.artifactId}-signed-aligned.apk + apk + signed-aligned + + + + + + attach-signed-aligned + package + + attach-artifact + + + + + + + + + diff --git a/res/layout/contents.xml b/res/layout/contents.xml index b67815a..3c9f726 100644 --- a/res/layout/contents.xml +++ b/res/layout/contents.xml @@ -20,17 +20,16 @@ android:layout_height="match_parent" class="com.proinlab.gdlapp.Contents$ActionBarPaddedFrameLayout" > - - + - - - \ No newline at end of file + diff --git a/src/com/proinlab/gdlapp/Contents.java b/src/com/proinlab/gdlapp/Contents.java index 38f2b69..5a5b542 100644 --- a/src/com/proinlab/gdlapp/Contents.java +++ b/src/com/proinlab/gdlapp/Contents.java @@ -1,27 +1,27 @@ package com.proinlab.gdlapp; import android.annotation.TargetApi; -import android.app.ActionBar; import android.content.Context; import android.graphics.drawable.ColorDrawable; +import android.os.Build; import android.os.Bundle; import android.util.AttributeSet; import android.view.KeyEvent; -import android.view.Menu; -import android.view.MenuItem; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.widget.FrameLayout; +import com.actionbarsherlock.app.ActionBar; +import com.actionbarsherlock.view.Menu; +import com.actionbarsherlock.view.MenuItem; import com.google.android.youtube.player.YouTubePlayer; -import com.google.android.youtube.player.YouTubePlayerFragment; +import com.google.android.youtube.player.YouTubePlayerSupportFragment; -@TargetApi(11) public class Contents extends YouTubeFailureRecoveryActivity implements YouTubePlayer.OnFullscreenListener { private ActionBarPaddedFrameLayout viewContainer; - private YouTubePlayerFragment playerFragment; + private YouTubePlayerSupportFragment playerFragment; private YouTubePlayer player; private String Title; @@ -65,17 +65,17 @@ protected void onCreate(Bundle savedInstanceState) { YouTubeId = getIntent().getExtras().getString(EXTRAS_CONTENTS_LINK); Title = getIntent().getExtras().getString(EXTRAS_CONTENTS_TITLE); - getActionBar().setBackgroundDrawable(new ColorDrawable(0xAA000000)); - getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); - getActionBar().setTitle(Title); - getActionBar().setDisplayHomeAsUpEnabled(true); + getSupportActionBar().setBackgroundDrawable(new ColorDrawable(0xAA000000)); + getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); + getSupportActionBar().setTitle(Title); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); viewContainer = (ActionBarPaddedFrameLayout) findViewById(R.id.view_container); - playerFragment = (YouTubePlayerFragment) getFragmentManager() + playerFragment = (YouTubePlayerSupportFragment) getSupportFragmentManager() .findFragmentById(R.id.player_fragment); playerFragment.initialize(DeveloperKey.DEVELOPER_KEY, this); - viewContainer.setActionBar(getActionBar()); + viewContainer.setActionBar(getSupportActionBar()); } @@ -94,7 +94,7 @@ public void onInitializationSuccess(YouTubePlayer.Provider provider, @Override protected YouTubePlayer.Provider getYouTubePlayerProvider() { - return (YouTubePlayerFragment) getFragmentManager().findFragmentById( + return (YouTubePlayerSupportFragment) getSupportFragmentManager().findFragmentById( R.id.player_fragment); } @@ -139,7 +139,7 @@ public void setActionBar(ActionBar actionBar) { public void setEnablePadding(boolean enable) { paddingEnabled = enable; - requestLayout(); + requestLayout(); } @Override diff --git a/src/com/proinlab/gdlapp/ListViewCustomAdapter.java b/src/com/proinlab/gdlapp/ListViewCustomAdapter.java index 79a6c51..2b3d421 100644 --- a/src/com/proinlab/gdlapp/ListViewCustomAdapter.java +++ b/src/com/proinlab/gdlapp/ListViewCustomAdapter.java @@ -72,7 +72,7 @@ public long getItemId(int position) { return position; } - // ׸ + // 각 항목의 뷰 생성 public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = Inflater.inflate(layout, parent, false); @@ -228,4 +228,4 @@ private String HtmlToString(String addr, String incoding) { return htmlSource; } -} \ No newline at end of file +} diff --git a/src/com/proinlab/gdlapp/YouTubeFailureRecoveryActivity.java b/src/com/proinlab/gdlapp/YouTubeFailureRecoveryActivity.java index 360790b..76cef8d 100644 --- a/src/com/proinlab/gdlapp/YouTubeFailureRecoveryActivity.java +++ b/src/com/proinlab/gdlapp/YouTubeFailureRecoveryActivity.java @@ -16,6 +16,7 @@ package com.proinlab.gdlapp; +import com.actionbarsherlock.app.SherlockFragmentActivity; import com.google.android.youtube.player.YouTubeBaseActivity; import com.google.android.youtube.player.YouTubeInitializationResult; import com.google.android.youtube.player.YouTubePlayer; @@ -27,7 +28,7 @@ * An abstract activity which deals with recovering from errors which may occur during API * initialization, but can be corrected through user action. */ -public abstract class YouTubeFailureRecoveryActivity extends YouTubeBaseActivity implements +public abstract class YouTubeFailureRecoveryActivity extends SherlockFragmentActivity implements YouTubePlayer.OnInitializedListener { private static final int RECOVERY_DIALOG_REQUEST = 1;