Skip to content

Commit

Permalink
Hiding action bar on initial opening screen
Browse files Browse the repository at this point in the history
  • Loading branch information
gotosleep committed Mar 26, 2014
1 parent ef936f0 commit 09e7dfb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<dimen name="game_list_item_top_padding">10dp</dimen>
<dimen name="game_field_margin_bottom">5dp</dimen>
<dimen name="game_label_margin_left">30dp</dimen>
<dimen name="itch_activity_logo_margin_bottom">40dp</dimen>
<dimen name="itch_activity_logo_margin_bottom">25dp</dimen>
<dimen name="itch_activity_login_button_horizontal_padding">30dp</dimen>

</resources>
5 changes: 3 additions & 2 deletions src/io/itch/activities/ItchActivity.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package io.itch.activities;

import io.itch.R;
import io.itch.R.id;
import io.itch.R.layout;
import io.itch.authentication.SessionHelper;
import io.itch.authentication.SessionHelper.SessionCallback;
import io.itch.compat.ActionBarHelper;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
Expand All @@ -19,6 +18,8 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_itch);

ActionBarHelper.hideActionBar(this);

final SessionCallback onLogin = new SessionCallback() {
@Override
public void onSuccess() {
Expand Down
4 changes: 0 additions & 4 deletions src/io/itch/activities/LoginActivity.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package io.itch.activities;

import io.itch.R;
import io.itch.R.id;
import io.itch.R.layout;
import io.itch.R.menu;
import io.itch.R.string;
import io.itch.api.ItchApiClient;
import io.itch.api.responses.KeyResponse;
import android.accounts.Account;
Expand Down
2 changes: 0 additions & 2 deletions src/io/itch/activities/MyGamesActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import io.itch.R;
import io.itch.R.id;
import io.itch.R.layout;
import io.itch.R.menu;
import io.itch.api.ItchApi;
import io.itch.api.ItchApiClient;
import io.itch.api.responses.GamesResponse;
Expand Down
16 changes: 16 additions & 0 deletions src/io/itch/compat/ActionBarHelper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package io.itch.compat;

import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class ActionBarHelper {

public static void hideActionBar(Activity activity) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
activity.getActionBar().hide();
}
}

}

0 comments on commit 09e7dfb

Please sign in to comment.