mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-30 08:11:17 +00:00
Added copy button to device IDs (fixes #559).
This commit is contained in:
parent
af5ba5c0d9
commit
f299ca2d1e
8 changed files with 6 additions and 2 deletions
|
@ -3,8 +3,10 @@ package com.nutomic.syncthingandroid.fragments;
|
|||
import android.app.Fragment;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import android.text.Editable;
|
||||
|
@ -378,6 +380,8 @@ public class DeviceFragment extends Fragment implements
|
|||
private void prepareEditMode() {
|
||||
getActivity().getWindow().setSoftInputMode(SOFT_INPUT_STATE_ALWAYS_HIDDEN);
|
||||
|
||||
Drawable dr = ContextCompat.getDrawable(getActivity(), R.drawable.ic_content_copy_black_24dp);
|
||||
mIdView.setCompoundDrawablesWithIntrinsicBounds(null, null, dr, null);
|
||||
mIdView.setEnabled(false);
|
||||
mQrButton.setVisibility(GONE);
|
||||
|
||||
|
|
|
@ -154,7 +154,6 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI
|
|||
return;
|
||||
|
||||
mDeviceId.setText(info.myID);
|
||||
mDeviceId.setVisibility(View.VISIBLE);
|
||||
mDeviceId.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
BIN
src/main/res/drawable-hdpi/ic_content_copy_black_24dp.png
Normal file
BIN
src/main/res/drawable-hdpi/ic_content_copy_black_24dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 299 B |
BIN
src/main/res/drawable-mdpi/ic_content_copy_black_24dp.png
Normal file
BIN
src/main/res/drawable-mdpi/ic_content_copy_black_24dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 228 B |
BIN
src/main/res/drawable-xhdpi/ic_content_copy_black_24dp.png
Normal file
BIN
src/main/res/drawable-xhdpi/ic_content_copy_black_24dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 308 B |
BIN
src/main/res/drawable-xxhdpi/ic_content_copy_black_24dp.png
Normal file
BIN
src/main/res/drawable-xxhdpi/ic_content_copy_black_24dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 404 B |
BIN
src/main/res/drawable-xxxhdpi/ic_content_copy_black_24dp.png
Normal file
BIN
src/main/res/drawable-xxxhdpi/ic_content_copy_black_24dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 473 B |
|
@ -61,7 +61,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:fontFamily="monospace"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||
android:visibility="invisible" />
|
||||
android:drawableRight="@drawable/ic_content_copy_black_24dp"
|
||||
android:drawableEnd="@drawable/ic_content_copy_black_24dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
|
Loading…
Reference in a new issue