Browse Source

minor improvements

pull/61/merge
Thodoris1999 6 years ago
parent
commit
d7d979d53e
  1. 4
      app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutboxFragment.java
  2. 3
      app/src/main/res/layout/activity_main.xml
  3. 24
      app/src/main/res/layout/fragment_shoutbox.xml

4
app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutboxFragment.java

@ -61,7 +61,9 @@ public class ShoutboxFragment extends BaseFragment {
shouts = new ArrayList<>(); shouts = new ArrayList<>();
shoutAdapter = new ShoutAdapter(getContext(), shouts); shoutAdapter = new ShoutAdapter(getContext(), shouts);
recyclerView.setAdapter(shoutAdapter); recyclerView.setAdapter(shoutAdapter);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
layoutManager.setReverseLayout(true);
recyclerView.setLayoutManager(layoutManager);
shoutboxTask = new ShoutboxTask(this::onShoutboxTaskSarted, this::onShoutboxTaskFinished); shoutboxTask = new ShoutboxTask(this::onShoutboxTaskSarted, this::onShoutboxTaskFinished);
shoutboxTask.execute("https://www.thmmy.gr/smf/index.php?"); shoutboxTask.execute("https://www.thmmy.gr/smf/index.php?");

3
app/src/main/res/layout/activity_main.xml

@ -19,7 +19,8 @@
<FrameLayout <FrameLayout
android:id="@+id/fragment_container" android:id="@+id/fragment_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:layout_above="@+id/main_bottom_navigation"/>
<com.google.android.material.bottomnavigation.BottomNavigationView <com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/main_bottom_navigation" android:id="@+id/main_bottom_navigation"

24
app/src/main/res/layout/fragment_shoutbox.xml

@ -6,6 +6,17 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progressBar"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding"
android:layout_width="match_parent"
android:layout_height="@dimen/progress_bar_height"
android:layout_alignParentTop="true"
android:indeterminate="true"
android:visibility="invisible"
app:mpb_indeterminateTint="@color/accent"
app:mpb_progressStyle="horizontal"/>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swiperefresh" android:id="@+id/swiperefresh"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -19,15 +30,10 @@
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<me.zhanghai.android.materialprogressbar.MaterialProgressBar <gr.thmmy.mthmmy.editorview.EditorView
android:id="@+id/progressBar" android:id="@+id/edior_view"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal.NoPadding"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/progress_bar_height" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_below="@id/swiperefresh"/>
android:indeterminate="true"
android:visibility="invisible"
app:mpb_indeterminateTint="@color/accent"
app:mpb_progressStyle="horizontal"/>
</RelativeLayout> </RelativeLayout>
Loading…
Cancel
Save