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
|
@ -51,24 +51,29 @@
|
|||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:gravity="center"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout android:id="@+id/send_log_layout"
|
||||
android:visibility="visible"
|
||||
android:gravity="center"
|
||||
android:layout_width="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" />
|
||||
<View android:layout_width="50dp" android:layout_height="0dp" />
|
||||
</LinearLayout>
|
||||
<Button android:id="@+id/exit"
|
||||
android:layout_toRightOf="@id/send_log"
|
||||
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"
|
||||
android:visibility="visible"/>
|
||||
<View android:layout_weight="1" android:layout_width="0dp" android:layout_height="0dp" />
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
|
||||
|
||||
</LinearLayout>
|
|
@ -27,6 +27,7 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
|
@ -36,6 +37,7 @@ public class AboutFragment extends Fragment implements OnClickListener {
|
|||
private FragmentsAvailable about = FragmentsAvailable.ABOUT_INSTEAD_OF_CHAT;
|
||||
View exitButton = null;
|
||||
View sendLogButton = null;
|
||||
LinearLayout sendLogLayout = null;
|
||||
|
||||
@Override
|
||||
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.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.setOnClickListener(this);
|
||||
|
|
Loading…
Reference in a new issue