Permalink
Browse files

use ActionBarSherlock instead of android-action

  • Loading branch information...
lytsing committed May 25, 2013
1 parent 9cfa77a commit 3d6f203a390460b4cdd1c8f8543c523ad55f0ccb
View
@@ -0,0 +1,2 @@
.DS_Store
*~
View
@@ -19,6 +19,48 @@ One fix per commit. If say a a commit closes the open issue 12. Just add `closes
All code that is contributed must be compliant with [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
## Build Instructions ##
Dependent three-part libraries projects:
* ActionBarSherlock http://actionbarsherlock.com/
* android-actionbar https://github.com/johannilsson/android-actionbar
* MenuDrawer https://github.com/SimonVT/android-menudrawer
* android-pulltorefresh-and-loadmore https://github.com/shontauro/android-pulltorefresh-and-loadmore
Just git clone them, and import into weibo project.
Instructions for building on the command line with ant can be found below.
### Building with Ant ###
Once you have the Android SDK installed along with the library dependencies,
run the following command from the root directory of the WordPress for Android
project:
android update project -p .
This will create a `local.properties` file that is specific for your setup.
You can then build the project by running:
ant debug
You can install the package onto a connected device or a virtual device by
running:
ant installd
Run all in one command:
./build.sh
Also see the full Android documentation, [Building and Running from the Command
Line][command-line].
[command-line]: http://developer.android.com/tools/building/building-cmdline.html
## Code Style Guidelines
Contributers are recommended to follow the Android [Code Style Guidelines](http://source.android.com/source/code-style.html).
View
@@ -7,8 +7,9 @@
<classpathentry kind="lib" path="libs/gson-2.2.2.jar"/>
<classpathentry kind="lib" path="libs/volley.jar"/>
<classpathentry kind="lib" path="libs/weibo.sdk.android.sso.jar"/>
<classpathentry kind="lib" path="libs/android-support-v4.jar"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="lib" path="/abs/libs/android-support-v4.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
View
@@ -5,7 +5,7 @@
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:minSdkVersion="14"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />
@@ -15,28 +15,26 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_APN_SETTINGS" />
<application
android:label="@string/app_name"
android:name=".WeiboApplication"
android:icon="@drawable/icon"
android:theme="@style/Weibo"
android:hardwareAccelerated="true">
<activity
android:name=".ui.AuthenticatedActivity"
android:exported="false"
android:configChanges="keyboardHidden|orientation"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.NoTitleBar" >
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<activity
android:name=".ui.TimelineActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@android:style/Theme.Holo.Light.NoActionBar" >
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
@@ -53,8 +51,7 @@
</activity>
<activity
android:name=".ui.StatusDetailActivity"
android:exported="false"
android:theme="@android:style/Theme.Holo.Light.NoActionBar" >
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
@@ -81,7 +78,6 @@
android:name=".ui.ComposeActivity"
android:configChanges="keyboardHidden|orientation"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Holo.Light.NoActionBar"
android:windowSoftInputMode="stateVisible|adjustResize" >
</activity>
<activity
View
@@ -8,7 +8,12 @@
cd ../../pulltorefresh-and-loadmore/
android update project -p . -t android-8
cd -
cd ../../actionbar/
cd ../../android-menudrawer/library
android update project -p . -t android-16
cd -
cd ../../abs
android update project -p . -t android-16
cd -
Binary file not shown.
View
@@ -9,9 +9,10 @@
# Project target.
target=android-16
android.library.reference.1=../../actionbar
android.library.reference.2=../../pulltorefresh-and-loadmore
android.library.reference.1=../../android-menudrawer/library
#config.logging=true
proguard.config=proguard.cfg
android.library.reference.3=../../abs
android.library.reference.2=../../pulltorefresh-and-loadmore
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 Johan Nilsson <http://markupartist.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/actionbar_background_start"
android:endColor="@color/actionbar_background_end"
android:angle="-90" />
</shape>
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2010, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<rotate
android:drawable="@drawable/spinner_16_outer_holo"
android:pivotX="50%"
android:pivotY="50%"
android:fromDegrees="0"
android:toDegrees="1080" />
</item>
<item>
<rotate
android:drawable="@drawable/spinner_16_inner_holo"
android:pivotX="50%"
android:pivotY="50%"
android:fromDegrees="720"
android:toDegrees="0" />
</item>
</layer-list>
Binary file not shown.
@@ -5,10 +5,6 @@
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.markupartist.android.widget.ActionBar
android:id="@+id/actionbar"
style="@style/ActionBar" />
<ListView
android:id="@+id/list_view"
android:layout_width="fill_parent"
@@ -3,10 +3,6 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.markupartist.android.widget.ActionBar
android:id="@+id/actionbar"
style="@style/ActionBar" />
<RelativeLayout
android:id="@+id/rl_all_edit"
@@ -5,11 +5,6 @@
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.markupartist.android.widget.ActionBar
android:id="@+id/actionbar"
app:title="@string/title_mblog_content"
style="@style/ActionBar" />
<LinearLayout
android:id="@+id/status_show_layout"
android:layout_width="fill_parent"
@@ -7,10 +7,6 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<com.markupartist.android.widget.ActionBar
android:id="@+id/actionbar"
style="@style/ActionBar" />
<LinearLayout
android:id="@+id/timelist_list"
android:layout_width="fill_parent"
View
@@ -0,0 +1,19 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/compose"
android:icon="@drawable/ic_action_compose"
android:showAsAction="ifRoom"
android:title="@string/compose"
android:titleCondensed="@string/compose">
</item>
<item
android:id="@+id/refresh"
android:icon="@drawable/ic_action_refresh"
android:showAsAction="ifRoom"
android:title="@string/refresh"
android:titleCondensed="@string/refresh">
</item>
</menu>
@@ -3,14 +3,17 @@
<item
android:id="@+id/comment_menu_item"
android:showAsAction="ifRoom|withText"
android:title="@string/add_comment" />
<item
android:id="@+id/repost_menu_item"
android:showAsAction="ifRoom|withText"
android:title="@string/repost" />
<item
android:id="@+id/favorites_menu_item"
android:showAsAction="ifRoom|withText"
android:title="@string/favorites" />
</menu>
@@ -29,6 +29,8 @@
<!-- TimelineActivity.java -->
<string name="new_blog_toast">您有%d条更新</string>
<string name="no_new_blog_toast">没有新的微博。</string>
<string name="compose">发表</string>
<string name="refresh">刷新</string>
<!-- repost.xml -->
<string name="add_comment"> 添加评论</string>
@@ -58,7 +60,7 @@
<string name="ok">是</string>
<string name="cancel">否</string>
<string name="close">关闭</string>
<string name="send_sucess">分享成功!</string>
<string name="send_success">分享成功!</string>
<string name="send_failed">分享失败!</string>
<string name="del_pic">是否删除图片?</string>
@@ -16,4 +16,12 @@
<color name="stream_content_color">#333</color>
<color name="stream_reshare_line_color">#ffcccccc</color>
<color name="default_stream_image_background">#eee</color>
<!-- android-actionbar -->
<color name="actionbar_separator">#8B1A1A</color>
<color name="actionbar_title">#FFFFFF</color>
<color name="actionbar_background_start">#8B1A1A</color>
<color name="actionbar_background_end">#CD2626</color>
<color name="actionbar_background_item_pressed_start">#FF7F00</color>
<color name="actionbar_background_item_pressed_end">#EE7600</color>
</resources>
@@ -18,5 +18,9 @@
<dimen name="page_loading_indicator_left_padding">6.0dip</dimen>
<!-- android-actionbar -->
<dimen name="actionbar_height">45dip</dimen>
<dimen name="actionbar_item_height">45dip</dimen>
<dimen name="actionbar_item_width">45dip</dimen>
</resources>
@@ -37,6 +37,8 @@
<!-- TimelineActivity.java -->
<string name="new_blog_toast">Receive %d New Weibo</string>
<string name="no_new_blog_toast">No new weibo.</string>
<string name="compose">Compose</string>
<string name="refresh">Refresh</string>
<!-- repost.xml -->
<string name="add_comment">Add comment </string>
@@ -71,7 +73,7 @@
<string name="ok">Yes</string>
<string name="cancel">No</string>
<string name="close">Cloase</string>
<string name="send_sucess">Post sucessful!</string>
<string name="send_success">Post successful!</string>
<string name="send_failed">Post failed!</string>
<string name="del_pic">是否删除图片?</string>
@@ -1,11 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Weibo" parent="Theme.Sherlock.Light">
<item name="actionBarStyle">@style/Weibo.ActionBar</item>
<item name="android:actionBarStyle">@style/Weibo.ActionBar</item>
</style>
<style name="Weibo.ActionBar" parent="Widget.Sherlock.ActionBar.Solid">
<item name="background">@drawable/actionbar_background</item>
<item name="backgroundStacked">@drawable/actionbar_background</item>
<item name="backgroundSplit">@drawable/actionbar_background</item>
<item name="titleTextStyle">@style/Weibo.ActionBar.Title</item>
<item name="android:background">@drawable/actionbar_background</item>
<item name="android:backgroundStacked">@drawable/actionbar_background</item>
<item name="android:backgroundSplit">@drawable/actionbar_background</item>
<item name="android:titleTextStyle">@style/Weibo.ActionBar.Title</item>
<item name="android:indeterminateProgressStyle">@style/IndeterminateProgress</item>
<item name="indeterminateProgressStyle">@style/IndeterminateProgress</item>
</style>
<style name="IndeterminateProgress" parent="@android:style/Widget.ProgressBar.Small">
<item name="android:indeterminateDrawable">@drawable/progress_small_holo</item>
</style>
<style name="Weibo.ActionBar.Title" parent="@android:TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">#fff</item>
</style>
<style name="ButtonBarDefaultStyle" parent="@android:style/ButtonBar">
<item name="android:paddingLeft">2.0dip</item>
<item name="android:paddingTop">4.0dip</item>
<item name="android:paddingRight">2.0dip</item>
</style>
<style name="FinskyBaseDialogTheme" parent="@android:style/Theme.Holo.Light.Dialog">
<item name="finskyButtonBarStyle">@style/ButtonBarDefaultStyle</item>
<item name="finskyButtonBarButtonStyle">?android:buttonStyle</item>
Oops, something went wrong.

0 comments on commit 3d6f203

Please sign in to comment.