Skip to content

Commit

Permalink
Merge pull request #5 from CreaRo/feature-icon-pack
Browse files Browse the repository at this point in the history
Feature icon pack
  • Loading branch information
ricknout committed May 25, 2016
2 parents be715e3 + e46bfcb commit 481ee59
Show file tree
Hide file tree
Showing 11 changed files with 581 additions and 50 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ dependencies {
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.pavelsikun:vintage-chroma:1.4.1'
compile 'com.github.satyan:sugar:1.5'
compile 'com.afollestad.material-dialogs:core:0.8.5.9'
}
34 changes: 34 additions & 0 deletions app/build.gradle.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "nickrout.lenslauncher"
minSdkVersion 16
targetSdkVersion 23
<<<<<<< HEAD
versionCode 20
versionName "1.2"
=======
versionCode 14
versionName "1.2.0"
>>>>>>> 0c9969d213bbd5efac04492932bd13b6d97bacc0
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.pavelsikun:vintage-chroma:1.4'
compile 'com.github.satyan:sugar:1.5'
compile 'com.afollestad.material-dialogs:core:0.8.5.9'
}
73 changes: 73 additions & 0 deletions app/src/main/AndroidManifest.xml.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="nickrout.lenslauncher">

<application
android:name="com.orm.SugarApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<meta-data
android:name="DATABASE"
android:value="app_persistent.db" />
<meta-data
android:name="VERSION"
<<<<<<< HEAD
android:value="2" />
=======
android:value="3" />
>>>>>>> 0c9969d213bbd5efac04492932bd13b6d97bacc0
<meta-data
android:name="QUERY_LOG"
android:value="false" />
<meta-data
android:name="DOMAIN_PACKAGE_NAME"
android:value="nickrout.lenslauncher.model" />

<activity
android:name=".ui.HomeActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:stateNotNeeded="true"
android:theme="@style/HomeTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<receiver android:name=".ui.HomeActivity$AppsUpdatedReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<action android:name="android.intent.action.PACKAGE_CHANGED" />
<action android:name="android.intent.action.PACKAGE_REPLACED" />

<data android:scheme="package" />
</intent-filter>
</receiver>

<activity
android:name=".ui.SettingsActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".ui.AboutActivity"
android:label="@string/activity_title_about"
android:screenOrientation="portrait">
</activity>

</application>

</manifest>
8 changes: 7 additions & 1 deletion app/src/main/java/nickrout/lenslauncher/ui/HomeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import nickrout.lenslauncher.model.App;
import nickrout.lenslauncher.util.AppUtil;
import nickrout.lenslauncher.util.ObservableObject;
import nickrout.lenslauncher.util.Settings;

/**
* Created by nickrout on 2016/04/02.
Expand All @@ -32,6 +33,8 @@ public class HomeActivity extends BaseActivity implements Observer {
private PackageManager mPackageManager;
private ArrayList<App> mApps;
private ArrayList<Bitmap> mAppIcons;
private Settings mSettings;

private ProgressDialog mProgressDialog;

@Override
Expand All @@ -44,7 +47,9 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_home);
ObservableObject.getInstance().addObserver(this);
mLensView = (LensView) findViewById(R.id.lens_view_apps);
mSettings = new Settings(getApplication());
loadApps(true);

}

private void loadApps(boolean isLoad) {
Expand Down Expand Up @@ -109,7 +114,7 @@ protected void onPreExecute() {
@Override
protected Void doInBackground(Void... arg0) {
mPackageManager = getPackageManager();
ArrayList<App> apps = AppUtil.getApps(mPackageManager, HomeActivity.this);
ArrayList<App> apps = AppUtil.getApps(mPackageManager, HomeActivity.this, getApplication(), mSettings.getString(Settings.KEY_ICON_PACK_LABEL_NAME));
mApps = new ArrayList<>();
mAppIcons = new ArrayList<>();
for (int i = 0; i < apps.size(); i++) {
Expand Down Expand Up @@ -137,6 +142,7 @@ protected void onPostExecute(Void result) {
dismissProgressDialog();
mLensView.setPackageManager(mPackageManager);
mLensView.setApps(mApps, mAppIcons);

super.onPostExecute(result);
}
}
Expand Down
Loading

0 comments on commit 481ee59

Please sign in to comment.