Skip to content

Commit

Permalink
上传缺少文件
Browse files Browse the repository at this point in the history
  • Loading branch information
tome34 committed Jul 25, 2018
1 parent 593ccdf commit 1b6ae63
Show file tree
Hide file tree
Showing 25 changed files with 680 additions and 4 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ android {
//配置apk路径
applicationVariants.all {
variant ->
def buildType = variant.buildType.name
variant.getPackageApplication().outputDirectory = new File(rootProject.rootDir,"releaseApk")
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
Expand All @@ -78,10 +80,14 @@ android {
def fileName = "frame_${releaseTime()}_v${rootProject.ext.android.versionName}.apk"
//控制输出的APK的存放路径
if (project.hasProperty('OUT_PUT_DIR_PARA')) {
// File output_dir1 = project.file("${OUT_PUT_DIR_PARA}");
// output.outputFile = new File("${OUT_PUT_DIR_PARA}", fileName)
// output.outputFile = new File(outputFile.parent, fileName)
// println "输出文件位置: " + output.outputFile
//AS 3.0之前自定义apk名称:
//File output_dir1 = project.file("${OUT_PUT_DIR_PARA}");
// output.outputFile = new File("${OUT_PUT_DIR_PARA}", fileName)
// println "输出文件位置: " + output.outputFile

//AS 3.0后
output.apkData.outputFileName = fileName // output.outputFile 改为 outputFileName

} else {
output.outputFile = new File(outputFile.parent, fileName)
println "输出文件位置: " + output.outputFile
Expand Down
Binary file added app/debug/app-debug.apk
Binary file not shown.
1 change: 1 addition & 0 deletions app/debug/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1},"path":"app-debug.apk","properties":{"packageId":"com.example.tome.framedemomo2","split":"","minSdkVersion":"17"}}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
package com.example.tome.component_base.base.mvc;

import android.view.View;
import android.view.ViewGroup;
import com.example.tome.component_base.R;
import com.example.tome.component_base.util.L;
import com.example.tome.component_base.widget.emptyViews.EmptyView;

/**
* @author tome
* @date 2018/7/9 16:30
* @describe ${处理空页面显示}
*/
public abstract class BaseEmptyVcFragment extends BaseVcFragment{
private ViewGroup mNormalView;
private ViewGroup mParent;
public EmptyView mEmptyView;
public View mEmptyGroup;

//用getview获取不到
@Override
protected void init(View view) {
if (view == null) {
return;
}
// mNormalView = (ViewGroup) view.findViewById(R.id.refresh_layout);
mNormalView = getViewGroup(view);
if (mNormalView == null) {
throw new IllegalStateException(
"The subclass of RootActivity must contain a View named 'mNormalView'.");
}
if (!(mNormalView.getParent() instanceof ViewGroup)) {
throw new IllegalStateException(
"mNormalView's ParentView should be a ViewGroup.");
}
//mParent = (ViewGroup) mNormalView.getParent(); 获取不到view
mParent = (ViewGroup) mNormalView.getRootView();
View.inflate(mContext, R.layout.base_empty_view_fragment, mParent);
mEmptyGroup = mParent.findViewById(R.id.empty_group);
mEmptyView = (EmptyView)mEmptyGroup.findViewById(R.id.empty_view);
mEmptyGroup.setVisibility(View.GONE);
L.d("空布局++"+mEmptyView);
}

@Override
public void showNormal() {
mNormalView.setVisibility(View.VISIBLE);
mEmptyView.hide();
mEmptyGroup.setVisibility(View.GONE);
}

@Override
public void showLoading() {
mNormalView.setVisibility(View.GONE);
mEmptyView.show();
mEmptyGroup.setVisibility(View.VISIBLE);
}

@Override
public void showEmptyView() {
mNormalView.setVisibility(View.GONE);
mEmptyView.hide();
mEmptyGroup.setVisibility(View.VISIBLE);
mEmptyView.showEnpty(R.mipmap.icon_empty, "这里什么都没有哦", null );

}

@Override
public void showError() {
mNormalView.setVisibility(View.GONE);
mEmptyView.hide();
mEmptyGroup.setVisibility(View.VISIBLE);
mEmptyView.showError(R.mipmap.error404,"出错了",null,"重新加载", null);
}

//由子类实现顶层布局id
public abstract ViewGroup getViewGroup(View view);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package com.example.tome.component_base.util;

import android.graphics.Color;
import java.util.Random;

/**
* @author tome
* @date 2018/7/11 16:58
* @describe ${其他的工具}
*/
public class OtherUtils {

/**
* 获取随机rgb颜色值
*/
public static int randomColor(){
Random random = new Random();
//0-190, 如果颜色值过大,就越接近白色,就看不清了,所以需要限定范围
int red =random.nextInt(150);
//0-190
int green =random.nextInt(150);
//0-190
int blue =random.nextInt(150);
//使用rgb混合生成一种新的颜色,Color.rgb生成的是一个int数
return Color.rgb(red,green, blue);
}

public static int randomTagColor() {
int randomNum = new Random().nextInt();
int position = randomNum % TAB_COLORS.length;
if (position < 0) {
position = -position;
}
return TAB_COLORS[position];
}

/**
* Tab colors
*/
public static final int[] TAB_COLORS = new int[]{
Color.parseColor("#90C5F0"),
Color.parseColor("#91CED5"),
Color.parseColor("#F88F55"),
Color.parseColor("#C0AFD0"),
Color.parseColor("#E78F8F"),
Color.parseColor("#67CCB7"),
Color.parseColor("#F6BC7E")
};
}
6 changes: 6 additions & 0 deletions component_base/src/main/res/color/qmui_btn_blue_border.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/btn_ghost_blue_border_disabled" android:state_enabled="false" />
<item android:color="@color/btn_ghost_blue_border_pressed" android:state_pressed="true" />
<item android:color="@color/btn_ghost_blue_border_normal" />
</selector>
6 changes: 6 additions & 0 deletions component_base/src/main/res/color/qmui_btn_blue_text.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/btn_ghost_blue_text_disabled" android:state_enabled="false" />
<item android:color="@color/btn_ghost_blue_text_pressed" android:state_pressed="true" />
<item android:color="@color/btn_ghost_blue_text_normal" />
</selector>
6 changes: 6 additions & 0 deletions component_base/src/main/res/color/s_btn_blue_border.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/app_color_blue_disabled" android:state_enabled="false" />
<item android:color="@color/app_color_blue_pressed" android:state_pressed="true" />
<item android:color="@color/app_color_blue" />
</selector>
15 changes: 15 additions & 0 deletions component_base/src/main/res/drawable/empty_button_selector.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<shape>
<solid android:color="@color/mainColor"/>
<corners android:radius="8dp"/>
</shape>
</item>
<item android:state_pressed="true">
<shape>
<solid android:color="@color/colorE75"/>
<corners android:radius="8dp"/>
</shape>
</item>
</selector>
24 changes: 24 additions & 0 deletions component_base/src/main/res/layout/base_empty_view_fragment.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/empty_group"
android:layout_width="match_parent"
android:layout_height="match_parent"
>

<android.support.v4.widget.Space
android:id="@+id/space"
android:layout_width="@dimen/dp_1"
android:layout_height="@dimen/dp_1"
android:layout_centerInParent="true" />

<com.example.tome.component_base.widget.emptyViews.EmptyView
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:qmui_title_text=""
app:qmui_detail_text=""
>
</com.example.tome.component_base.widget.emptyViews.EmptyView>
</RelativeLayout>
43 changes: 43 additions & 0 deletions component_base/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="button_style">
<attr name="QMUIButtonStyle" format="reference"/>
<attr name="qmui_alpha_pressed" format="float"/>
<attr name="qmui_alpha_disabled" format="float"/>
</declare-styleable>

<!-- EmptyView start -->
<declare-styleable name="QMUIEmptyView">
<attr name="qmui_show_loading" format="boolean"/>
<attr name="qmui_image_view" format="integer"/>
<attr name="qmui_title_text" format="string"/>
<attr name="qmui_detail_text" format="string"/>
<attr name="qmui_btn_text" format="string"/>
</declare-styleable>
<!-- EmptyView end -->

<!--Loading-->
<declare-styleable name="QMUILoadingStyle">
<attr name="LoadingStyle" format="reference"/>

</declare-styleable>

<!--************ QMUILoading ***********-->
<declare-styleable name="LoadingView">
<attr name="qmui_loading_view_size" format="dimension"/>
<attr name="qmui_loading_view_color" format="color"/>
</declare-styleable>

<!--圆角按钮-->
<declare-styleable name="QMUIRoundButton">
<attr name="qmui_backgroundColor"/>
<attr name="qmui_borderColor"/>
<attr name="qmui_borderWidth"/>
<attr name="qmui_isRadiusAdjustBounds"/>
<attr name="qmui_radius"/>
<attr name="qmui_radiusTopLeft"/>
<attr name="qmui_radiusTopRight"/>
<attr name="qmui_radiusBottomLeft"/>
<attr name="qmui_radiusBottomRight"/>
</declare-styleable>
</resources>
Binary file added frameKey.jks
Binary file not shown.
6 changes: 6 additions & 0 deletions module_common_ui/src/main/res/drawable/qmui_tip_dialog_bg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="@color/qmui_config_color_75_pure_black" />
<corners android:radius="15dp" />
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package com.example.tome.module_shop_mall.dao;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.util.Log;

import org.greenrobot.greendao.AbstractDaoMaster;
import org.greenrobot.greendao.database.StandardDatabase;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseOpenHelper;
import org.greenrobot.greendao.identityscope.IdentityScopeType;


// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version 1): knows all DAOs.
*/
public class DaoMaster extends AbstractDaoMaster {
public static final int SCHEMA_VERSION = 1;

/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
SearchHistoryBeanDao.createTable(db, ifNotExists);
}

/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
SearchHistoryBeanDao.dropTable(db, ifExists);
}

/**
* WARNING: Drops all table on Upgrade! Use only during development.
* Convenience method using a {@link DevOpenHelper}.
*/
public static DaoSession newDevSession(Context context, String name) {
Database db = new DevOpenHelper(context, name).getWritableDb();
DaoMaster daoMaster = new DaoMaster(db);
return daoMaster.newSession();
}

public DaoMaster(SQLiteDatabase db) {
this(new StandardDatabase(db));
}

public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
registerDaoClass(SearchHistoryBeanDao.class);
}

public DaoSession newSession() {
return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);
}

public DaoSession newSession(IdentityScopeType type) {
return new DaoSession(db, type, daoConfigMap);
}

/**
* Calls {@link #createAllTables(Database, boolean)} in {@link #onCreate(Database)} -
*/
public static abstract class OpenHelper extends DatabaseOpenHelper {
public OpenHelper(Context context, String name) {
super(context, name, SCHEMA_VERSION);
}

public OpenHelper(Context context, String name, CursorFactory factory) {
super(context, name, factory, SCHEMA_VERSION);
}

@Override
public void onCreate(Database db) {
Log.i("greenDAO", "Creating tables for schema version " + SCHEMA_VERSION);
createAllTables(db, false);
}
}

/** WARNING: Drops all table on Upgrade! Use only during development. */
public static class DevOpenHelper extends OpenHelper {
public DevOpenHelper(Context context, String name) {
super(context, name);
}

public DevOpenHelper(Context context, String name, CursorFactory factory) {
super(context, name, factory);
}

@Override
public void onUpgrade(Database db, int oldVersion, int newVersion) {
Log.i("greenDAO", "Upgrading schema from version " + oldVersion + " to " + newVersion + " by dropping all tables");
dropAllTables(db, true);
onCreate(db);
}
}

}
Loading

0 comments on commit 1b6ae63

Please sign in to comment.