Browse Source

StatsFragment init

pull/24/head
Apostolos Fanakis 8 years ago
parent
commit
b18a68ee5c
  1. 1
      app/build.gradle
  2. 78
      app/src/main/res/layout/profile_fragment_stats.xml
  3. 6
      app/src/main/res/values/strings.xml

1
app/build.gradle

@ -50,6 +50,7 @@ dependencies {
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
compile 'org.jsoup:jsoup:1.10.1'
compile 'com.github.franmontiel:PersistentCookieJar:v1.0.0'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile('com.mikepenz:materialdrawer:5.8.1@aar') {
transitive = true
}

78
app/src/main/res/layout/profile_fragment_stats.xml

@ -1,7 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginBottom="4dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="4dp"
android:background="@color/background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/general_statistics_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/card_background"
android:text="@string/general_statistics_title"
android:textAlignment="center"
android:textColor="@color/primary_text"
android:textStyle="bold"/>
<TextView
android:id="@+id/general_statistics"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/general_statistics"
android:textColor="@color/primary_text"/>
<TextView
android:id="@+id/posting_activity_by_time_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/card_background"
android:text="@string/posting_activity_by_time_title"
android:textAlignment="center"
android:textColor="@color/primary_text"
android:textStyle="bold"/>
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/posting_activity_by_time_chart"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/most_popular_boards_by_posts_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/card_background"
android:text="@string/most_popular_boards_by_posts_title"
android:textAlignment="center"
android:textColor="@color/primary_text"
android:textStyle="bold"/>
<com.github.mikephil.charting.charts.HorizontalBarChart
android:id="@+id/most_popular_boards_by_posts_chart"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/most_popular_boards_by_activity_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/card_background"
android:text="@string/most_popular_boards_by_activity_title"
android:textAlignment="center"
android:textColor="@color/primary_text"
android:textStyle="bold"/>
<com.github.mikephil.charting.charts.HorizontalBarChart
android:id="@+id/most_popular_boards_by_activity_chart"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>

6
app/src/main/res/values/strings.xml

@ -41,4 +41,10 @@
<string name="user_number_of_posts">#%1$d</string>
<string name="byUser">by %1$s</string>
<string name="general_statistics_title">General Statistics</string>
<string name="general_statistics">Statistics</string>
<string name="posting_activity_by_time_title">Posting Activity</string>
<string name="most_popular_boards_by_posts_title">Most Popular Boards By Posts</string>
<string name="most_popular_boards_by_activity_title">Most Popular Boards By Activity</string>
</resources>

Loading…
Cancel
Save