Permalink
Browse files

Merge pull request #1 from koyachi/feature-screen_animation

Feature screen animation
  • Loading branch information...
2 parents 9a0d03e + 3f59285 commit 8852bd7182c474444c269b02ce5dc8e328f81426 Takuo Kitame committed Apr 9, 2012
View
10 README.mkdn
@@ -7,3 +7,13 @@ https://github.com/koyachi/app-ojiichankeitai2
当方のAndroid版はJava/twitter4jで実装してあります。
+
+
+ビルドとエミュレータでの動作確認方法
+===============================
+
+1. libs以下にtwitter4j(http://twitter4j.org/ja/index.html)のjarを配置
+2. エミュレータ起動(例: emulator -avd Android_2.1)
+3. ビルド(ant debug)
+4. エミュレータにインストール(/path/to/android-sdk/platform-tools/adb install ./bin/Main-debug-unaligned.apk)
+5. エミュレータ上でおじいちゃん携帯アプリを起動
View
85 build.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="Main" default="help">
+
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <property file="local.properties" />
+
+ <!-- The ant.properties file can be created by you. It is only edited by the
+ 'android' tool to add properties to it.
+ This is the place to change some Ant specific build properties.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ For other overridable properties, look at the beginning of the rules
+ files in the SDK, at tools/ant/build.xml
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="ant.properties" />
+
+ <!-- The project.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+
+ This contains project specific properties such as project target, and library
+ dependencies. Lower level build properties are stored in ant.properties
+ (or in .classpath for Eclipse projects).
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <loadproperties srcFile="project.properties" />
+
+ <!-- quick check on sdk.dir -->
+ <fail
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
+ unless="sdk.dir"
+ />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+<!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ /* This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
+ <target name="-post-compile">
+ </target>
+-->
+
+ <!-- Import the actual build file.
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <import> task.
+ - customize it to your needs.
+ - Customize the whole content of build.xml
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, replacing the <import> task.
+ - customize to your needs.
+
+ ***********************
+ ****** IMPORTANT ******
+ ***********************
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+ in order to avoid having your file be overridden by tools such as "android update project"
+ -->
+ <!-- version-tag: 1 -->
+ <import file="${sdk.dir}/tools/ant/build.xml" />
+
+</project>
View
10 local.properties
@@ -0,0 +1,10 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must *NOT* be checked in Version Control Systems,
+# as it contains information specific to your local configuration.
+
+# location of the SDK. This is only used by Ant
+# For customization when using a Version Control System, please read the
+# header note.
+sdk.dir=/Users/koyachi/SDKs/android-sdk-macosx
View
BIN main.xcf
Binary file not shown.
View
10 proguard.cfg
@@ -10,20 +10,26 @@
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native <methods>;
}
--keepclasseswithmembernames class * {
+-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
--keepclasseswithmembernames class * {
+-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
+-keepclassmembers class * extends android.app.Activity {
+ public void *(android.view.View);
+}
+
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
View
2 default.properties → project.properties
@@ -4,7 +4,7 @@
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
-# "build.properties", and override values to adapt the script to your
+# "ant.properties", and override values to adapt the script to your
# project structure.
# Project target.
View
BIN res/drawable-hdpi/anim_touch_001.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/anim_touch_002.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/anim_touch_003.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/anim_touch_004.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
6 res/drawable-hdpi/animation_screen_ok.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
+ android:oneshot="false">
+ <item android:drawable="@drawable/screen_ok1" android:duration="500" />
+ <item android:drawable="@drawable/screen_ok2" android:duration="500" />
+</animation-list>
View
6 res/drawable-hdpi/animation_screen_post.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
+ android:oneshot="false">
+ <item android:drawable="@drawable/screen_post1" android:duration="500" />
+ <item android:drawable="@drawable/screen_post2" android:duration="500" />
+</animation-list>
View
8 res/drawable-hdpi/animation_touch.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
+ android:oneshot="true">
+ <item android:drawable="@drawable/anim_touch_001" android:duration="100" />
+ <item android:drawable="@drawable/anim_touch_002" android:duration="100" />
+ <item android:drawable="@drawable/anim_touch_003" android:duration="100" />
+ <item android:drawable="@drawable/anim_touch_004" android:duration="100" />
+</animation-list>
View
BIN res/drawable-hdpi/body.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/button_batari_off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/button_batari_on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/button_furoa_off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/button_furoa_on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/button_furoha_off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/button_furoha_on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/button_gabari_off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/button_gabari_on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/screen_blank.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/screen_ng.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/screen_ok1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/screen_ok2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/screen_post1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN res/drawable-hdpi/screen_post2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
56 res/layout/main.xml
@@ -1,13 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
>
- <ImageView android:src="@drawable/main"
+ <FrameLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ <ImageView android:src="@drawable/body"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:id="@+id/mainimage"
+ android:scaleType="fitXY"
+ />
+ <ImageView android:id="@+id/screenimage"
+ android:src="@drawable/screen_blank"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:id="@+id/mainimage"
- android:scaleType="fitXY" />
-
+ android:scaleType="fitXY"
+ />
+ <ImageView android:id="@+id/button_batari"
+ android:src="@drawable/button_batari_off"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:scaleType="fitXY"
+ />
+ <ImageView android:id="@+id/button_furoha"
+ android:src="@drawable/button_furoha_off"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:scaleType="fitXY"
+ />
+ <ImageView android:id="@+id/button_gabari"
+ android:src="@drawable/button_gabari_off"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:scaleType="fitXY"
+ />
+ <ImageView android:id="@+id/button_furoa"
+ android:src="@drawable/button_furoa_off"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:scaleType="fitXY"
+ />
+ <ImageView android:id="@+id/particle"
+ android:src="@drawable/anim_touch_001"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:scaleType="fitXY"
+ />
+ </FrameLayout>
</LinearLayout>
View
227 src/jp/takuo/android/ojiichan/Main.java
@@ -3,7 +3,7 @@
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
-import twitter4j.http.AccessToken;
+import twitter4j.auth.AccessToken;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
@@ -13,16 +13,27 @@
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Bundle;
+import android.os.Handler;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewGroup;
import android.view.View.OnTouchListener;
+import android.view.Display;
+import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.Toast;
+import android.widget.LinearLayout;
+import android.graphics.Matrix;
+import android.graphics.drawable.AnimationDrawable;
+import android.util.DisplayMetrics;
+import java.util.HashMap;
+import java.util.Timer;
+import java.util.TimerTask;
public class Main extends Activity implements
DialogInterface.OnClickListener, DialogInterface.OnCancelListener {
@@ -40,35 +51,150 @@
private static final int ACTION_BATARI = 2;
private static final int ACTION_FUROHA = 3;
private static final int ACTION_FUROA = 4;
+ private static final int MAGIC_HEIGHT = -19; // なんかy座標ずれるので調整してたらこの値だったけど詳細不明
private static boolean mAuthed = false;
private Twitter mTwitter;
private AccessToken mAccessToken;
private String mScreenName;
- private ProgressDialog mProgressDialog;
private Context mContext;
private MenuItem mItem;
+ private ImageView mScreenImage;
+ private ImageView mBatariButton;
+ private ImageView mGabariButton;
+ private ImageView mFurohaButton;
+ private ImageView mFuroaButton;
+ private ImageView mParticle;
+ private float mScaleX;
+ private float mScaleY;
+
+ class ButtonInfo {
+ private int x, y;
+ private int width, height;
+ private int offResourceId, onResourceId;
+ private ImageView imageView;
+
+ ButtonInfo(int offResourceId, int onResourceId, int x, int y, int width, int height, ImageView imageView) {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ this.offResourceId = offResourceId;
+ this.onResourceId = onResourceId;
+ this.imageView = imageView;
+ }
+
+ int getX() { return x; }
+ int getY() { return y; }
+ int getWidth() { return width; }
+ int getHeight() { return height; }
+ int getOffResourceId() { return offResourceId; }
+ int getOnResourceId() { return onResourceId; }
+ ImageView getImageView() { return imageView; }
+
+ void buttonOn() {
+ imageView.setImageResource(onResourceId);
+ }
+
+ void buttonOff() {
+ imageView.setImageResource(offResourceId);
+ }
+ }
+
+ class AnimationTerminator extends TimerTask {
+ private static final int DEFAULT_IMAGE_ID = 0;
+
+ private AnimationDrawable animation;
+ private ImageView imageView;
+ private int imageId;
+ private boolean disableOnTerminate;
+
+ AnimationTerminator(AnimationDrawable animation, ImageView imageView, int imageId) {
+ this.animation = animation;
+ this.imageView = imageView;
+ this.imageId = imageId;
+ this.disableOnTerminate = false;
+ }
+
+ // for particle
+ AnimationTerminator(AnimationDrawable animation, ImageView imageView, boolean disableOnTerminate) {
+ this.animation = animation;
+ this.imageView = imageView;
+ this.imageId = DEFAULT_IMAGE_ID;
+ this.disableOnTerminate = disableOnTerminate;
+ }
+
+ public void terminate() {
+ if (animation != null) animation.stop();
+ if (imageId != DEFAULT_IMAGE_ID) imageView.setImageResource(imageId);
+ if (disableOnTerminate) imageView.setVisibility(View.GONE);
+ }
+
+ @Override
+ public void run() {
+ mHandler.post(new Runnable() {
+ public void run() {
+ terminate();
+ }
+ });
+ }
+ }
+
+ private ButtonInfo mLastActionButton;
+ private Handler mHandler;
+ AnimationDrawable mAnimation;
+ AnimationDrawable mParticleAnimation;
+ private HashMap<Integer, ButtonInfo> mButtonInfo;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mContext = getApplicationContext();
setContentView(R.layout.main);
+ mHandler = new Handler();
+ mScreenImage = (ImageView)findViewById(R.id.screenimage);
+ mBatariButton = (ImageView)findViewById(R.id.button_batari);
+ mGabariButton = (ImageView)findViewById(R.id.button_gabari);
+ mFurohaButton = (ImageView)findViewById(R.id.button_furoha);
+ mFuroaButton = (ImageView)findViewById(R.id.button_furoa);
+ mParticle = (ImageView)findViewById(R.id.particle);
ImageView image = (ImageView)findViewById(R.id.mainimage);
+
+ WindowManager wm = (WindowManager)getSystemService(WINDOW_SERVICE);
+ Display disp = wm.getDefaultDisplay();
+ DisplayMetrics metrics = new DisplayMetrics();
+ disp.getMetrics(metrics);
+
+ int titleBarHeight = 0;
+ switch (metrics.densityDpi) {
+ case DisplayMetrics.DENSITY_HIGH:
+ titleBarHeight = 48;
+ break;
+ case DisplayMetrics.DENSITY_MEDIUM:
+ titleBarHeight = 32;
+ break;
+ case DisplayMetrics.DENSITY_LOW:
+ titleBarHeight = 24;
+ break;
+ }
+
+ Log.d(LOG_TAG, "titleBarHeight = " + titleBarHeight);
+ int w = disp.getWidth();
+ int h = disp.getHeight() - titleBarHeight;
+ Log.d(LOG_TAG, "w: " + w + ", h: " + h);
+ mScaleX = (float)w / (float)438;
+ mScaleY = (float)h / (float)600;
+ Log.d(LOG_TAG, "mScaleX: " + mScaleX + ", mScaleY:" + mScaleY);
image.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
// FIXME: make better ImageMap implementation.
float x;
float y;
- int w = v.getWidth();
- int h = v.getHeight();
int curAction = ACTION_NONE;
- float xscale = (float)w / (float)438;
- float yscale = (float)h / (float)600;
- x = event.getX() / xscale;
- y = event.getY() / yscale;
- // Log.d(LOG_TAG, "x: " + x + ", y:" + y);
+ x = event.getX() / mScaleX;
+ y = event.getY() / mScaleY;
+ Log.d(LOG_TAG, "x: " + x + ", y:" + y);
if (x >= 90 && x <= 210 &&
y >= 300 && y <= 425) curAction = ACTION_BATARI;
else if (x >= 110 && x <= 200 &&
@@ -80,13 +206,62 @@ else if (x >= 245 && x <= 370 &&
if (event.getAction() == MotionEvent.ACTION_DOWN) {
mActionType = curAction;
Log.d(LOG_TAG, "DOWN ACTION: " + curAction);
+ if (mActionType != ACTION_NONE) {
+ ButtonInfo buttonInfo = mButtonInfo.get(mActionType);
+ buttonInfo.buttonOn();
+ mLastActionButton = buttonInfo;
+ }
+
+ Matrix matrix = new Matrix();
+ matrix.reset();
+ matrix.postScale(mScaleX, mScaleY);
+ mParticle.setImageMatrix(matrix);
+ mParticle.setPadding((int)(-75 * mScaleX + event.getX()), (int)(-75 + mScaleY +event.getY()), 0, 0);
+ mParticle.setVisibility(View.VISIBLE);
+ mParticle.setImageResource(R.drawable.animation_touch);
+ //if (mParticleAnimation != null) mParticleAnimation.terminate();
+ mParticleAnimation = (AnimationDrawable)mParticle.getDrawable();
+ mParticleAnimation.start();
+ new Timer().schedule(new AnimationTerminator(mParticleAnimation, mParticle, true), 4 * 100);
} else if (event.getAction() == MotionEvent.ACTION_UP ) {
Log.d(LOG_TAG, "UP ACTION: " + curAction);
- if (mActionType == curAction) doAction(mActionType);
+ if (mLastActionButton != null) {
+ mLastActionButton.buttonOff();
+ }
+ if (mActionType == curAction) {
+ doAction(mActionType);
+ if (mLastActionButton != null) {
+ mLastActionButton.buttonOff();
+ mLastActionButton = null;
+ }
+ }
}
return true;
}
});
+
+ mButtonInfo = new HashMap<Integer, ButtonInfo>();
+ mButtonInfo.put(ACTION_BATARI, new ButtonInfo(R.drawable.button_batari_off, R.drawable.button_batari_on, 81, 292, 147, 152, mBatariButton));
+ mButtonInfo.put(ACTION_GABARI, new ButtonInfo(R.drawable.button_gabari_off, R.drawable.button_gabari_on, 98, 443, 106, 111, mGabariButton));
+ mButtonInfo.put(ACTION_FUROHA, new ButtonInfo(R.drawable.button_furoha_off, R.drawable.button_furoha_on, 228, 292, 133, 143, mFurohaButton));
+ mButtonInfo.put(ACTION_FUROA, new ButtonInfo(R.drawable.button_furoa_off, R.drawable.button_furoa_on, 238, 438, 156, 129, mFuroaButton));
+
+ Matrix matrix = new Matrix();
+ matrix.reset();
+ matrix.postScale(mScaleX, mScaleY);
+ mScreenImage.setImageMatrix(matrix);
+ mScreenImage.setPadding((int)(42 * mScaleX), (int)((50 + MAGIC_HEIGHT) * mScaleY), 0, 0);
+
+ for (ButtonInfo bi : mButtonInfo.values()) {
+ matrix.reset();
+ matrix.postScale(mScaleX, mScaleY);
+ ImageView iv = bi.getImageView();
+ iv.setImageMatrix(matrix);
+ iv.setPadding((int)(bi.getX() * mScaleX), (int)((bi.getY() + MAGIC_HEIGHT) * mScaleY), 0, 0);
+ }
+
+ mParticle.setVisibility(View.GONE);
+
mTwitter = new TwitterFactory().getInstance();
mTwitter.setOAuthConsumer(CONSUMER_KEY, CONSUMER_SEC);
isAuthed();
@@ -130,29 +305,39 @@ public boolean onOptionsItemSelected(MenuItem item) {
private String mText;
public AsyncUpdate() {
- mProgressDialog = new ProgressDialog(Main.this);
- mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
}
protected void onProgressUpdate(String... progress) {
- mProgressDialog.setMessage(progress[0]);
}
protected void onPreExecute() {
super.onPreExecute();
- mProgressDialog.setIndeterminate(true);
- mProgressDialog.setTitle(R.string.sending_title);
- mProgressDialog.show();
+ mScreenImage.setImageResource(R.drawable.animation_screen_post);
+ mAnimation = (AnimationDrawable)mScreenImage.getDrawable();
+ mAnimation.start();
}
protected void onPostExecute(Void result) {
super.onPostExecute(result);
- if(mProgressDialog != null &&
- mProgressDialog.isShowing()) {
- mProgressDialog.dismiss();
- mProgressDialog = null;
+ if (mText.equals(getString(R.string.success))) {
+ mHandler.post(new Runnable() {
+ public void run() {
+ mAnimation.stop();
+ mScreenImage.setImageResource(R.drawable.animation_screen_ok);
+ mAnimation = (AnimationDrawable)mScreenImage.getDrawable();
+ mAnimation.start();
+ new Timer().schedule(new AnimationTerminator(mAnimation, mScreenImage, R.drawable.screen_blank), 3 * 1000);
+ }
+ });
+ } else {
+ mHandler.post(new Runnable() {
+ public void run() {
+ mScreenImage.setImageResource(R.drawable.screen_ng);
+ new Timer().schedule(new AnimationTerminator(null, mScreenImage, R.drawable.screen_blank), 3 * 1000);
+ }
+ });
+ Toast.makeText(mContext, mText, Toast.LENGTH_LONG).show();
}
- Toast.makeText(mContext, mText, Toast.LENGTH_LONG).show();
}
@Override
View
4 src/jp/takuo/android/ojiichan/TwitterLogin.java
@@ -3,8 +3,8 @@
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
-import twitter4j.http.AccessToken;
-import twitter4j.http.RequestToken;
+import twitter4j.auth.AccessToken;
+import twitter4j.auth.RequestToken;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;

0 comments on commit 8852bd7

Please sign in to comment.