Skip to content

Commit

Permalink
Minor refactorizations
Browse files Browse the repository at this point in the history
  • Loading branch information
saulmm committed Aug 25, 2015
1 parent d9226cb commit c84b866
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
14 changes: 5 additions & 9 deletions app/src/main/java/saulmm/myapplication/AvatarImageBehavior.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,11 @@ public boolean layoutDependsOn(CoordinatorLayout parent, CircleImageView child,
return dependency instanceof Toolbar;
}

int mStartYPosition = 0;

int mFinalYPosition = 0;

int finalHeight = 130;

int mStartHeight = 0;

int mFinalXPosition = 0;
private int mStartYPosition = 0;
private int mFinalYPosition = 0;
private int finalHeight = 0;
private int mStartHeight = 0;
private int mFinalXPosition = 0;

@Override
public boolean onDependentViewChanged(CoordinatorLayout parent, CircleImageView child, View dependency) {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/saulmm/myapplication/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ protected void onCreate(Bundle savedInstanceState) {

bindActivity();

mToolbar.setTitle("");
setSupportActionBar(mToolbar);
startAlphaAnimation(mTitle, 0, View.INVISIBLE);
mAppBarLayout.addOnOffsetChangedListener(this);
Expand All @@ -53,6 +54,7 @@ private void bindActivity() {
mAppBarLayout = (AppBarLayout) findViewById(R.id.main_appbar);
mImageparallax = (ImageView) findViewById(R.id.main_imageview_placeholder);
mFrameParallax = (FrameLayout) findViewById(R.id.main_framelayout_title);

}

private void initParallaxValues() {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
android:background="@color/primary"
app:layout_anchor="@id/main.framelayout.title"
app:theme="@style/ThemeOverlay.AppCompat.Dark"
app:title=""
>

<LinearLayout
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/example_resources.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- dimensions -->
<dimen name="image_width">120dp</dimen>
<dimen name="image_margin">300dp</dimen>
<dimen name="image_final_width">56dp</dimen>
<dimen name="image_final_width">48dp</dimen>

<!-- styles -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
Expand All @@ -17,7 +17,7 @@
</style>

<!-- strings -->
<string name="app_name"></string>
<string name="app_name">Coordinator example</string>
<string name="quila_name">Quila</string>
<string name="quila_tagline">I love bones and slippers</string>
<string name="quila_name2">Quila!</string>
Expand Down

0 comments on commit c84b866

Please sign in to comment.