Fix about view when logs collect is disabled
This commit is contained in:
parent
6360526c8d
commit
dcf05629b2
2 changed files with 57 additions and 49 deletions
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@drawable/background"
|
android:background="@drawable/background"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
|
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
|
||||||
|
|
||||||
|
@ -29,46 +29,51 @@
|
||||||
|
|
||||||
<View android:layout_weight="50" android:layout_width="0dp" android:layout_height="0dp" />
|
<View android:layout_weight="50" android:layout_width="0dp" android:layout_height="0dp" />
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/about_text"
|
android:text="@string/about_text"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="@color/text_contrast"
|
android:textColor="@color/text_contrast"
|
||||||
android:id="@+id/AboutText"/>
|
android:id="@+id/AboutText"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/about_link"
|
android:text="@string/about_link"
|
||||||
android:autoLink="web"
|
android:autoLink="web"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="@color/text_contrast"
|
android:textColor="@color/text_contrast"
|
||||||
android:id="@+id/AboutLink"/>
|
android:id="@+id/AboutLink"/>
|
||||||
|
|
||||||
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
|
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:gravity="center"
|
android:gravity="center_horizontal"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<View android:layout_weight="1" android:layout_width="0dp" android:layout_height="0dp" />
|
|
||||||
<Button
|
|
||||||
android:id="@+id/send_log"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/menu_send_log"/>
|
|
||||||
<View android:layout_weight="1" android:layout_width="0dp" android:layout_height="0dp" />
|
|
||||||
<Button android:id="@+id/exit"
|
|
||||||
android:layout_toRightOf="@id/send_log"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/menu_exit"
|
|
||||||
android:visibility="visible"/>
|
|
||||||
<View android:layout_weight="1" android:layout_width="0dp" android:layout_height="0dp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
<LinearLayout android:id="@+id/send_log_layout"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<Button
|
||||||
|
android:id="@+id/send_log"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/menu_send_log"/>
|
||||||
|
<View android:layout_width="50dp" android:layout_height="0dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
<Button android:id="@+id/exit"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_toRightOf="@id/send_log_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/menu_exit"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
|
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -27,6 +27,7 @@ import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,6 +37,7 @@ public class AboutFragment extends Fragment implements OnClickListener {
|
||||||
private FragmentsAvailable about = FragmentsAvailable.ABOUT_INSTEAD_OF_CHAT;
|
private FragmentsAvailable about = FragmentsAvailable.ABOUT_INSTEAD_OF_CHAT;
|
||||||
View exitButton = null;
|
View exitButton = null;
|
||||||
View sendLogButton = null;
|
View sendLogButton = null;
|
||||||
|
LinearLayout sendLogLayout = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
@ -55,7 +57,8 @@ public class AboutFragment extends Fragment implements OnClickListener {
|
||||||
|
|
||||||
sendLogButton = view.findViewById(R.id.send_log);
|
sendLogButton = view.findViewById(R.id.send_log);
|
||||||
sendLogButton.setOnClickListener(this);
|
sendLogButton.setOnClickListener(this);
|
||||||
sendLogButton.setVisibility(getResources().getBoolean(R.bool.enable_log_collect) ? View.VISIBLE : View.GONE);
|
sendLogLayout = (LinearLayout)view.findViewById(R.id.send_log_layout);
|
||||||
|
sendLogLayout.setVisibility(getResources().getBoolean(R.bool.enable_log_collect) ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
exitButton = view.findViewById(R.id.exit);
|
exitButton = view.findViewById(R.id.exit);
|
||||||
exitButton.setOnClickListener(this);
|
exitButton.setOnClickListener(this);
|
||||||
|
|
Loading…
Reference in a new issue