Skip to content

Commit

Permalink
add "beautiful" logo
Browse files Browse the repository at this point in the history
  • Loading branch information
vayan committed Jan 28, 2014
1 parent bff3768 commit 0bf2fe6
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 2 deletions.
Binary file added assets/logo.xcf
Binary file not shown.
Binary file modified ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion res/menu/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>

</menu>
12 changes: 11 additions & 1 deletion src/com/vaya/unlockcounter/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
Expand All @@ -14,6 +16,14 @@
public class MainActivity extends Activity {

public static final String LOG_TAG = "UC_MAIN";
private static final String activity_title = "Unlock Counter";

public void updateTheme() {
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);

if (sharedPref.getBoolean("use_dark_theme", false)) setTheme(android.R.style.Theme_Holo);
else setTheme(android.R.style.Theme_Holo_Light);
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
Expand All @@ -33,13 +43,13 @@ protected void onCreate(Bundle savedInstanceState) {
startService(new Intent(MainActivity.this, LockerService.class));
super.onCreate(savedInstanceState);

updateTheme();

ActionBar actionBar = getActionBar();
actionBar.setDisplayShowTitleEnabled(false);

setContentView(R.layout.activity_main);


Log.d(LOG_TAG, "MainActivity created");
}

Expand Down
2 changes: 2 additions & 0 deletions src/com/vaya/unlockcounter/SettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d(LOG_TAG, "Create activity settings");

updateTheme();

ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setTitle(activity_title);
Expand Down

0 comments on commit 0bf2fe6

Please sign in to comment.