-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finished basic layout of discovery page.
- Loading branch information
Showing
14 changed files
with
261 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
Workoutathome/src/main/java/com/joumaa/workouthome/model/SectionHeaderRow.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.joumaa.workouthome.model; | ||
|
||
import android.view.View; | ||
import android.widget.ImageView; | ||
import android.widget.TextView; | ||
|
||
import com.joumaa.workouthome.R; | ||
import com.joumaa.workouthome.temporary.Section; | ||
|
||
/** | ||
* Created by dany on 10/28/13. | ||
*/ | ||
public class SectionHeaderRow { | ||
public TextView titleView; | ||
public TextView seeMoreText; | ||
public ImageView seeMoreImage; | ||
|
||
public static SectionHeaderRow newInstance(View view) { | ||
SectionHeaderRow sectionHeaderRow = new SectionHeaderRow(); | ||
sectionHeaderRow.findViews(view); | ||
return sectionHeaderRow; | ||
} | ||
|
||
private void findViews(View view) { | ||
titleView = (TextView) view.findViewById(R.id.headerTitle); | ||
seeMoreText = (TextView) view.findViewById(R.id.seeAllText); | ||
seeMoreImage = (ImageView) view.findViewById(R.id.seeAllIcon); | ||
} | ||
|
||
public void configureViewWithSection(Section section) { | ||
titleView.setText(section.title); | ||
|
||
int seeMoreVisibility = section.hasMore ? View.VISIBLE : View.GONE; | ||
seeMoreText.setVisibility(seeMoreVisibility); | ||
seeMoreImage.setVisibility(seeMoreVisibility); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Workoutathome/src/main/java/com/joumaa/workouthome/temporary/DiscoverPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.joumaa.workouthome.temporary; | ||
|
||
import java.util.ArrayList; | ||
|
||
/** | ||
* Created by dany on 10/28/13. | ||
*/ | ||
public class DiscoverPage { | ||
public ArrayList<Section> sections; | ||
|
||
public static DiscoverPage buildTestDiscoverPage() { | ||
DiscoverPage discoverPage = new DiscoverPage(); | ||
|
||
discoverPage.sections = new ArrayList<Section>(); | ||
discoverPage.sections.add(Section.buildTestSection()); | ||
discoverPage.sections.add(Section.buildTestSection()); | ||
|
||
return discoverPage; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Workoutathome/src/main/java/com/joumaa/workouthome/temporary/FeaturedPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.joumaa.workouthome.temporary; | ||
|
||
/** | ||
* Created by dany on 10/28/13. | ||
*/ | ||
public class FeaturedPage { | ||
public Section mainSection; | ||
|
||
public static FeaturedPage buildTestFeaturedPage() { | ||
FeaturedPage page = new FeaturedPage(); | ||
page.mainSection = Section.buildTestSection(); | ||
return page; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
Workoutathome/src/main/java/com/joumaa/workouthome/temporary/Section.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.joumaa.workouthome.temporary; | ||
|
||
import java.util.ArrayList; | ||
|
||
/** | ||
* Created by dany on 10/28/13. | ||
*/ | ||
public class Section { | ||
public String title; | ||
public ArrayList<Video> videos; | ||
public boolean hasMore; | ||
|
||
public static Section buildTestSection() { | ||
Section section = new Section(); | ||
section.title = "Most awesome workouts"; | ||
|
||
section.videos = new ArrayList<Video>(); | ||
section.videos.add(Video.buildTestVideo()); | ||
section.videos.add(Video.buildTestVideo()); | ||
section.videos.add(Video.buildTestVideo()); | ||
|
||
section.hasMore = true; | ||
|
||
return section; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<LinearLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/columnsContainer" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="horizontal" | ||
android:gravity="center_horizontal" | ||
android:background="@color/fragment_background" | ||
> | ||
|
||
</RelativeLayout> | ||
<LinearLayout | ||
android:id="@+id/column1" | ||
android:layout_height="wrap_content" | ||
android:layout_width="320dp" | ||
android:orientation="vertical" | ||
> | ||
|
||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:id="@+id/column2" | ||
android:layout_height="wrap_content" | ||
android:layout_width="320dp" | ||
android:layout_marginLeft="20dp" | ||
android:orientation="vertical" | ||
android:layout_toRightOf="@id/column1" | ||
> | ||
|
||
</LinearLayout> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.