[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [snowflake-mobile/master] Refactored .xml MainFragment code



commit ab9b4f1dd3c021ef139945c493a02a104b1d815e
Author: Hashik Donthineni <HashikDonthineni@xxxxxxxxx>
Date:   Sat Jul 11 03:04:40 2020 +0530

    Refactored .xml MainFragment code
---
 .../main/java/org/torproject/snowflake/fragments/MainFragment.java    | 3 +--
 app/src/main/res/layout/fragment_main_fragment.xml                    | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/app/src/main/java/org/torproject/snowflake/fragments/MainFragment.java b/app/src/main/java/org/torproject/snowflake/fragments/MainFragment.java
index be71745..d45a216 100644
--- a/app/src/main/java/org/torproject/snowflake/fragments/MainFragment.java
+++ b/app/src/main/java/org/torproject/snowflake/fragments/MainFragment.java
@@ -2,7 +2,6 @@ package org.torproject.snowflake.fragments;
 
 import android.content.Context;
 import android.os.Bundle;
-import android.text.Layout;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -79,7 +78,7 @@ public class MainFragment extends Fragment {
         int served = callback.getServed();
         Log.d(TAG, "showServed: " + served);
 
-        if(served > 0){
+        if (served > 0) {
             usersServedTV.setVisibility(View.VISIBLE);
             usersServedTV.setText(getString(R.string.users_served_text) + served);
         }
diff --git a/app/src/main/res/layout/fragment_main_fragment.xml b/app/src/main/res/layout/fragment_main_fragment.xml
index d7f2bd9..f6b4c4d 100644
--- a/app/src/main/res/layout/fragment_main_fragment.xml
+++ b/app/src/main/res/layout/fragment_main_fragment.xml
@@ -20,10 +20,10 @@
         android:layout_height="wrap_content"
         android:layout_below="@id/start_button"
         android:layout_centerHorizontal="true"
-        android:paddingTop="10dp"
+        android:gravity="center"
         android:paddingLeft="50dp"
+        android:paddingTop="10dp"
         android:paddingRight="50dp"
-        android:gravity="center"
         android:visibility="gone" />
 
 </RelativeLayout>
\ No newline at end of file



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits