Skip to content

Commit

Permalink
Remove unused imports and reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
jraska committed Jul 27, 2016
1 parent aff304d commit 868618c
Show file tree
Hide file tree
Showing 11 changed files with 195 additions and 201 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
package com.jraska.falcon.sample;

import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import android.support.v4.content.ContextCompat;
import org.junit.Assume;

import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThan;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static com.jraska.falcon.sample.Assumptions.assumeNoCI;
import static com.jraska.falcon.sample.asserts.BitmapAssert.assertThatBitmap;
import static org.assertj.core.api.Assertions.assertThat;

@RunWith(AndroidJUnit4.class)
public class FalconFloatingWindowTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import android.os.Build;
import android.os.Bundle;
import android.view.Display;
import android.view.Menu;
import android.view.WindowManager;

public class FloatingViewActivity extends SampleActivity {
Expand Down
38 changes: 19 additions & 19 deletions falcon-sample/src/main/res/layout/activity_sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@
android:fitsSystemWindows="true"
tools:context=".SampleActivity">

<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:theme="@style/AppTheme.AppBarOverlay">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />

</android.support.design.widget.AppBarLayout>
</android.support.design.widget.AppBarLayout>

<include layout="@layout/content_sample" />
<include layout="@layout/content_sample" />

<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_screenshot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_menu_camera" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_screenshot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_menu_camera" />

</android.support.design.widget.CoordinatorLayout>
100 changes: 50 additions & 50 deletions falcon-sample/src/main/res/layout/content_sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,63 @@
android:layout_height="match_parent"
tools:context=".SampleActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:weightSum="4"
android:orientation="horizontal">
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:weightSum="4"
android:orientation="horizontal">

<Button
android:id="@+id/show_snack"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/show_snack" />
<Button
android:id="@+id/show_snack"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/show_snack" />

<Button
android:id="@+id/show_toast"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/show_toast" />
<Button
android:id="@+id/show_toast"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/show_toast" />

<Button
android:id="@+id/show_dialog"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/show_dialog" />
<Button
android:id="@+id/show_dialog"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/show_dialog" />

<Button
android:id="@+id/show_popup"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/show_popup" />
</LinearLayout>
<Button
android:id="@+id/show_popup"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/show_popup" />
</LinearLayout>

<TextView
android:id="@+id/countdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
android:textColor="@color/mainText"
android:textSize="@dimen/text_main"
android:gravity="center"
tools:text="Screenshot in 3"/>
<TextView
android:id="@+id/countdown"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
tools:visibility="visible"
android:textColor="@color/mainText"
android:textSize="@dimen/text_main"
android:gravity="center"
tools:text="Screenshot in 3" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:text="@string/large_text" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:text="@string/large_text" />
</LinearLayout>

</android.support.v4.widget.NestedScrollView>
8 changes: 4 additions & 4 deletions falcon-sample/src/main/res/menu/menu_sample.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.jraska.calendar.MainActivity">
<item
android:id="@+id/action_floating"
android:title="@string/action_floating"
app:showAsAction="always" />
<item
android:id="@+id/action_floating"
android:title="@string/action_floating"
app:showAsAction="always" />
</menu>
12 changes: 6 additions & 6 deletions falcon-sample/src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<resources>

<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
8 changes: 4 additions & 4 deletions falcon-sample/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="mainText">#222222</color>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="mainText">#222222</color>
</resources>
6 changes: 3 additions & 3 deletions falcon-sample/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources>
<dimen name="fab_margin">16dp</dimen>
<dimen name="text_margin">16dp</dimen>
<dimen name="text_main">24sp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="text_margin">16dp</dimen>
<dimen name="text_main">24sp</dimen>
</resources>
Loading

0 comments on commit 868618c

Please sign in to comment.