Skip to content

Commit

Permalink
update ui , replace uber with alipay luckymoney
Browse files Browse the repository at this point in the history
  • Loading branch information
larryxiao625 committed Feb 12, 2018
1 parent 3a85897 commit ca97832
Show file tree
Hide file tree
Showing 16 changed files with 198 additions and 116 deletions.
34 changes: 10 additions & 24 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -76,41 +76,27 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaPrecompile" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-rules" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/splits-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="com.android.support:support-compat-25.1.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-media-compat-25.1.0" level="project" />
<orderEntry type="library" exported="" name="com.tencent.bugly:crashreport_upgrade-1.3.4" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-core-utils-25.1.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:animated-vector-drawable-25.1.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-annotations:25.1.0@jar" level="project" />
<orderEntry type="library" exported="" name="com.android.support:appcompat-v7-25.1.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-v4-25.1.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-vector-drawable-25.1.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-core-ui-25.1.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-fragment-25.1.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:animated-vector-drawable-25.4.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-annotations:25.4.0@jar" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-core-utils-25.4.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-v4-25.4.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-vector-drawable-25.4.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-fragment-25.4.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-media-compat-25.4.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:appcompat-v7-25.4.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-core-ui-25.4.0" level="project" />
<orderEntry type="library" exported="" name="com.android.support:support-compat-25.4.0" level="project" />
<orderEntry type="library" exported="" name="com.tencent.bugly:nativecrashreport-3.3.1" level="project" />
<orderEntry type="library" exported="" name="org.apache.http.legacy-android-25" level="project" />
</component>
Expand Down
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ android {
defaultConfig {
applicationId "xyz.monkeytong.hongbao"
minSdkVersion 19
targetSdkVersion 26
versionCode 5
versionName "v4.0.1"
targetSdkVersion 25
versionCode 7
versionName "v5.0.0"
ndk {
//设置支持的SO库架构
abiFilters 'armeabi', 'armeabi-v7a' //, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
Expand Down Expand Up @@ -40,6 +40,6 @@ android {
//其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.0.1
compile 'com.tencent.bugly:nativecrashreport:latest.release'
//其中latest.release指代最新版本号,也可以指定明确的版本号,例如2.2.0
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:support-v4:25.4.0'
compile 'com.android.support:appcompat-v7:25.4.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,8 @@ public void openGitHub(View view) {

public void openUber(View view) {
Intent webViewIntent = new Intent(this, WebViewActivity.class);
webViewIntent.putExtra("title", getString(R.string.webview_uber_title));
String[] couponList = new String[]{"https://dc.tt/oTLtXH2BHsD", "https://dc.tt/ozFJHDnfLky"};
int index = (int) (Math.random() * 2);
webViewIntent.putExtra("url", couponList[index]);
webViewIntent.putExtra("title", getString(R.string.webview_alipay_title));
String[] couponList = new String[]{"https://render.alipay.com/p/f/fd-j6lzqrgm/guiderofmklvtvw.html?shareId=2088422430692204&campStr=p1j%2BdzkZl018zOczaHT4Z5CLdPVCgrEXq89JsWOx1gdt05SIDMPg3PTxZbdPw9dL&sign=DEqbE64SUB0qjRQGtu%2F0BPXN9YsSXM2zqLHT1X2ufDs%3D&scene=offlinePaymentNewSns"};
startActivity(webViewIntent);
}

Expand Down
42 changes: 42 additions & 0 deletions app/src/main/res/layout-v21/activity_preferences.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#E46C62"
tools:context=".SettingsActivity"
>
<TextView android:layout_width="wrap_content" android:layout_height="54dp"
android:id="@+id/settings_bar"
android:text="@string/preference" android:textColor="#fff"
android:gravity="left|center_vertical|center_horizontal"
android:elegantTextHeight="false" android:textSize="18sp"
android:layout_toEndOf="@+id/preference_back"
/>
<ImageView
android:layout_width="40dp"
android:layout_height="match_parent"
android:id="@+id/preference_back"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:clickable="true" android:onClick="performBack"
android:layout_alignBottom="@+id/settings_bar"
android:src="@mipmap/ic_back" android:padding="10dp" android:focusable="true" android:contentDescription="TODO" />
<ImageView android:layout_width="40dp" android:layout_height="match_parent" android:id="@+id/imageView3"
android:clickable="true"
android:onClick="enterAccessibilityPage"
android:layout_alignParentEnd="true"
android:layout_marginEnd="10dp" android:layout_marginStart="8dp"
android:padding="8dp" android:src="@mipmap/ic_refresh"
android:layout_alignBottom="@+id/settings_bar" android:focusable="true" android:contentDescription="@string/todo" />
</RelativeLayout>
<FrameLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/preferences_fragment"
tools:layout="@android:layout/simple_list_item_1"/>
</LinearLayout>
47 changes: 47 additions & 0 deletions app/src/main/res/layout-v21/activity_webview.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".activities.WebViewActivity">

<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#E46C62"
tools:context=".WebViewActivity"
>
<TextView android:layout_width="wrap_content" android:layout_height="54dp"
android:id="@+id/webview_bar"
android:text="@string/app_name"
android:gravity="left|center_vertical|center_horizontal"
android:elegantTextHeight="false" android:textSize="18sp"
android:layout_toEndOf="@+id/webview_back"
android:textColor="#fff"/>
<ImageView
android:layout_width="40dp"
android:layout_height="fill_parent"
android:id="@+id/webview_back"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:clickable="true" android:onClick="performBack"
android:layout_alignBottom="@+id/webview_bar"
android:src="@mipmap/ic_back" android:layout_alignParentBottom="false"
android:layout_alignParentTop="false" android:layout_alignParentStart="true"
android:cropToPadding="false" android:padding="10dp" android:focusable="true" android:contentDescription="@string/todo" />
<ImageView
android:layout_width="40dp"
android:layout_height="fill_parent"
android:id="@+id/webview_outlink"
android:layout_marginEnd="10dp"
android:clickable="true" android:onClick="openLink"
android:layout_alignBottom="@+id/webview_bar"
android:src="@mipmap/ic_open_in_browser" android:layout_alignParentEnd="true"
android:layout_marginStart="8dp" android:padding="8dp" android:contentDescription="@string/todo" android:focusable="true" />
</RelativeLayout>
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/webView"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
Loading

0 comments on commit ca97832

Please sign in to comment.