Skip to content

Commit

Permalink
Modified card layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Kadyan authored and znck-graveyard committed Dec 27, 2013
1 parent bc696cb commit 1aa25ca
Show file tree
Hide file tree
Showing 99 changed files with 98 additions and 30 deletions.
52 changes: 52 additions & 0 deletions .idea/codeStyleSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions .idea/libraries/ComAndroidSupportAppcompatV71900_aar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions .idea/libraries/ComAndroidSupportGridlayoutV71900_aar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Apr 10 15:27:10 PDT 2013
#Fri Dec 27 19:13:22 GMT+05:30 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-bin.zip
Empty file modified gradlew
100644 → 100755
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/build.gradle → katana/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
classpath 'com.android.tools.build:gradle:0+'
}
}
apply plugin: 'android'
Expand Down
2 changes: 1 addition & 1 deletion app/app.iml → katana/katana.iml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</facet>
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":app" />
<option name="GRADLE_PROJECT_PATH" value=":katana" />
</configuration>
</facet>
</component>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ public TCDQuestion(String uniqueId, String id, int color, String title, String q
} catch (ParseException e) {
e.printStackTrace();
}
sdf = new SimpleDateFormat("yyyy-MM-dd");
assert this.date != null;
this.dateString = sdf.format(this.date);
this.status = getStatus();
Expand All @@ -313,11 +314,8 @@ private int getBackground(int color) {

public String getStatus() {
if (ret) return status;
long seconds = ((new Date()).getTime() - date.getTime()) / 1000;
if (seconds < 0) {
ret = true;
status = dateString;
} else if (seconds < 60) status = "about " + seconds + " seconds ago";
long seconds = Math.abs(((new Date()).getTime() - date.getTime()) / 1000);
if (seconds < 60) status = "about " + seconds + " seconds ago";
else if (seconds < 3600) status = "about " + (seconds / 60) + " minutes ago";
else if (seconds < 86400) status = "about " + (seconds / 3600) + " hours ago";
else if (seconds < 172800) status = "yesterday";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,24 @@
android:layout_height="wrap_content"
android:text="A Japanese ship was en route to the open sea. The Japanese captain went for a shower removing his diamond ring and Rolex watch on the table. When he returned, his valuables were missing. \n A Japanese ship was en route to the open sea. The Japanese captain went for a shower removing his diamond ring and Rolex watch on the table. When he returned, his valuables were missing."
android:id="@+id/tcd_question"
android:textColor="@color/tcd_color_content_text"
android:textColor="@color/tcd_color_card_text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:maxLines="6"
android:layout_marginTop="@dimen/default_gap"
android:layout_below="@+id/tcd_title"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:ellipsize="end"

android:layout_alignRight="@+id/tcd_title"
android:layout_alignEnd="@+id/tcd_title"
android:layout_above="@+id/tcd_status"
android:paddingBottom="8dp"/>
android:layout_alignParentRight="true"
android:layout_above="@+id/tcd_status" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="..."
android:textColor="@color/tcd_color_content_text"
android:id="@+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -52,10 +57,7 @@
android:id="@+id/tcd_status"
android:textColor="@color/tcd_color_status_text"
android:layout_alignParentBottom="true"
android:layout_alignLeft="@+id/tcd_question"
android:layout_alignStart="@+id/tcd_question"
android:layout_alignRight="@+id/tcd_question"
android:layout_alignEnd="@+id/tcd_question"/>
android:layout_alignParentRight="true"/>
</RelativeLayout>

<TextView
Expand All @@ -73,4 +75,5 @@
android:layout_marginLeft="@dimen/activity_horizontal_margin"
/>

</RelativeLayout>
</RelativeLayout>
<!--TODO remove placeholder strings-->
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
<color name="tcd_color_title_text">#003442</color>
<color name="tcd_color_content_text">#000000</color>
<color name="tcd_color_status_text">#aaa</color>
<color name="tcd_color_card_text">#444</color>

</resources>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app'
include 'katana'
15 changes: 15 additions & 0 deletions technothlon-android-app.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/main" />
<output-test url="file://$MODULE_DIR$/build/classes/test" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

0 comments on commit 1aa25ca

Please sign in to comment.