Browse Source

Code cleanup and fixes

pull/24/head
Apostolos Fanakis 8 years ago
parent
commit
70eff69a73
  1. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java
  2. 4
      app/src/main/java/gr/thmmy/mthmmy/activities/profile/ProfileActivity.java
  3. 6
      app/src/main/res/layout-v21/activity_profile.xml
  4. 31
      app/src/main/res/layout/activity_profile.xml
  5. 1
      app/src/main/res/layout/activity_topic.xml

2
app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java

@ -89,7 +89,7 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF
@Override
public void onRecentFragmentInteraction(TopicSummary topicSummary) {
Intent i = new Intent(MainActivity.this, TopicActivity.class);
i.putExtra(EXTRAS_TOPIC_URL, topicSummary.getTopicUrl());
i.putExtra(EXTRAS_TOPIC_URL, "https://www.thmmy.gr/smf/index.php?topic=67565.0");
i.putExtra(EXTRAS_TOPIC_TITLE, topicSummary.getTitle());
startActivity(i);
}

4
app/src/main/java/gr/thmmy/mthmmy/activities/profile/ProfileActivity.java

@ -99,8 +99,8 @@ public class ProfileActivity extends BaseActivity {
userThumbnail = (ImageView) findViewById(R.id.user_thumbnail);
userName = (TextView) findViewById(R.id.profile_act_username);
personalText = (TextView) findViewById(R.id.profile_act_personal_text);
mainContent = (LinearLayout) findViewById(R.id.profile_act_content);
personalText = (TextView) findViewById(R.id.profile_activity_personal_text);
mainContent = (LinearLayout) findViewById(R.id.profile_activity_content);
replyFAB = (FloatingActionButton) findViewById(R.id.profile_fab);
replyFAB.setEnabled(false);

6
app/src/main/res/layout-v21/activity_profile.xml

@ -17,7 +17,7 @@
android:theme="@style/ToolbarTheme">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/main.collapsing"
android:id="@+id/main_collapsing"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
@ -46,7 +46,7 @@
app:layout_collapseMode="parallax"/>
<TextView
android:id="@+id/profile_act_personal_text"
android:id="@+id/profile_activity_personal_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -97,7 +97,7 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="@+id/profile_act_content"
android:id="@+id/profile_activity_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"

31
app/src/main/res/layout/activity_profile.xml

@ -17,7 +17,7 @@
android:theme="@style/ToolbarTheme">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/main.collapsing"
android:id="@+id/main_collapsing"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
@ -45,7 +45,7 @@
app:layout_collapseMode="parallax"/>
<TextView
android:id="@+id/profile_act_personal_text"
android:id="@+id/profile_activity_personal_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -72,19 +72,8 @@
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progressBar"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="invisible"
app:layout_anchor="@id/appbar"
app:layout_anchorGravity="bottom|center"
app:mpb_indeterminateTint="@color/accent"
app:mpb_progressStyle="horizontal"/>
<android.support.v4.widget.NestedScrollView
android:id="@+id/nested_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="top|start"
@ -97,7 +86,7 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="@+id/profile_act_content"
android:id="@+id/profile_activity_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
@ -105,6 +94,18 @@
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progressBar"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="invisible"
app:layout_anchor="@id/nested_scroll"
app:layout_anchorGravity="top|center"
app:mpb_indeterminateTint="@color/accent"
app:mpb_progressStyle="horizontal"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/profile_fab"
android:layout_width="wrap_content"

1
app/src/main/res/layout/activity_topic.xml

@ -90,7 +90,6 @@
app:srcCompat="@drawable/page_last"/>
</android.support.v7.widget.FitWindowsLinearLayout>
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progressBar"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding"

Loading…
Cancel
Save