1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 19:31:30 +00:00

Set invisible placeholder for device ID (fixes #357).

This commit is contained in:
Felix Ableitner 2015-04-20 22:13:38 +02:00
parent c767259889
commit b9dec163e0
3 changed files with 8 additions and 1 deletions

View file

@ -180,6 +180,7 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI
return; return;
mDeviceId.setText(info.myID); mDeviceId.setText(info.myID);
mDeviceId.setVisibility(View.VISIBLE);
mDeviceId.setOnTouchListener(new View.OnTouchListener() { mDeviceId.setOnTouchListener(new View.OnTouchListener() {
@Override @Override
public boolean onTouch(View view, MotionEvent motionEvent) { public boolean onTouch(View view, MotionEvent motionEvent) {

View file

@ -21,7 +21,10 @@
android:id="@+id/device_id" android:id="@+id/device_id"
android:layout_below="@id/device_id_title" android:layout_below="@id/device_id_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:typeface="monospace"
android:text="@string/device_id_placeholder"
android:visibility="invisible"/>
</RelativeLayout> </RelativeLayout>

View file

@ -60,6 +60,9 @@
<!-- DrawerFragment --> <!-- DrawerFragment -->
<!-- Placeholder for device ID field, to avoid layout changes. This is never visible to users. -->
<string name="device_id_placeholder" translatable="false">xxxxxxx-xxxxxxx-xxxxxxx-xxxxxxx-xxxxxxx-xxxxxxx-xxxxxxx-xxxxxxx</string>
<!-- Same as download_title with a colon and space appended --> <!-- Same as download_title with a colon and space appended -->
<string name="download_title_colon">Download:\u0020</string> <string name="download_title_colon">Download:\u0020</string>