mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 22:31:16 +00:00
Renamed layouts to more effectively group them based on their uses.
This commit is contained in:
parent
90b5d2ff9a
commit
0ad971f19a
19 changed files with 13 additions and 19 deletions
|
@ -63,7 +63,7 @@ public class FolderPickerActivity extends SyncthingActivity
|
|||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
setContentView(R.layout.folder_picker_activity);
|
||||
setContentView(R.layout.activity_folder_picker);
|
||||
mListView = (ListView) findViewById(android.R.id.list);
|
||||
mListView.setOnItemClickListener(this);
|
||||
mListView.setEmptyView(findViewById(android.R.id.empty));
|
||||
|
|
|
@ -9,7 +9,6 @@ import android.util.Log;
|
|||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.EditText;
|
||||
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.widget.ScrollView;
|
||||
|
@ -18,7 +17,6 @@ import android.widget.TextView;
|
|||
import com.nutomic.syncthingandroid.R;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
|
@ -42,7 +40,7 @@ public class LogActivity extends SyncthingActivity {
|
|||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.log_activity);
|
||||
setContentView(R.layout.activity_log);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
|
|
|
@ -82,7 +82,7 @@ public class MainActivity extends SyncthingActivity
|
|||
mDisabledDialog = SyncthingService.showDisabledDialog(MainActivity.this);
|
||||
} else if (mLoadingDialog == null) {
|
||||
LayoutInflater inflater = getLayoutInflater();
|
||||
View dialogLayout = inflater.inflate(R.layout.loading_dialog, null);
|
||||
View dialogLayout = inflater.inflate(R.layout.dialog_loading, null);
|
||||
TextView loadingText = (TextView) dialogLayout.findViewById(R.id.loading_text);
|
||||
loadingText.setText((getService().isFirstStart())
|
||||
? R.string.web_gui_creating_key
|
||||
|
@ -194,7 +194,7 @@ public class MainActivity extends SyncthingActivity
|
|||
final ActionBar actionBar = getSupportActionBar();
|
||||
|
||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||
setContentView(R.layout.main_activity);
|
||||
setContentView(R.layout.activity_main);
|
||||
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||
|
||||
mViewPager = (ViewPager) findViewById(R.id.pager);
|
||||
|
@ -375,7 +375,7 @@ public class MainActivity extends SyncthingActivity
|
|||
@Override
|
||||
public void onReceiveUsageReport(String report) {
|
||||
View v = LayoutInflater.from(MainActivity.this)
|
||||
.inflate(R.layout.usage_reporting_dialog, null);
|
||||
.inflate(R.layout.dialog_usage_reporting, null);
|
||||
TextView tv = (TextView) v.findViewById(R.id.example);
|
||||
tv.setText(report);
|
||||
new AlertDialog.Builder(MainActivity.this)
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.nutomic.syncthingandroid.activities;
|
|||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ComponentName;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.http.SslCertificate;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
|
@ -17,7 +16,6 @@ import android.webkit.WebViewClient;
|
|||
import android.widget.ProgressBar;
|
||||
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
||||
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
|
@ -32,8 +30,6 @@ import java.security.SignatureException;
|
|||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.CertificateFactory;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Holds a WebView that shows the web ui of the local syncthing instance.
|
||||
|
@ -108,7 +104,7 @@ public class WebGuiActivity extends SyncthingActivity
|
|||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.web_gui_activity);
|
||||
setContentView(R.layout.activity_web_gui);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
mLoadingView = findViewById(R.id.loading);
|
||||
|
|
|
@ -68,7 +68,7 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI
|
|||
if (convertView == null) {
|
||||
LayoutInflater inflater = (LayoutInflater) getContext()
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = inflater.inflate(R.layout.menu_item, parent, false);
|
||||
convertView = inflater.inflate(R.layout.item_menu, parent, false);
|
||||
}
|
||||
|
||||
ImageView icon = (ImageView) convertView.findViewById(R.id.icon);
|
||||
|
@ -114,7 +114,7 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI
|
|||
*/
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.drawer_fragment, container, false);
|
||||
View view = inflater.inflate(R.layout.fragment_drawer, container, false);
|
||||
mDeviceId = (TextView) view.findViewById(R.id.device_id);
|
||||
mCpuUsage = (TextView) view.findViewById(R.id.cpu_usage);
|
||||
mRamUsage = (TextView) view.findViewById(R.id.ram_usage);
|
||||
|
|
|
@ -34,7 +34,7 @@ public class DevicesAdapter extends ArrayAdapter<RestApi.Device>
|
|||
};
|
||||
|
||||
public DevicesAdapter(Context context) {
|
||||
super(context, R.layout.device_list_item);
|
||||
super(context, R.layout.item_device_list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -42,7 +42,7 @@ public class DevicesAdapter extends ArrayAdapter<RestApi.Device>
|
|||
if (convertView == null) {
|
||||
LayoutInflater inflater = (LayoutInflater) getContext()
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = inflater.inflate(R.layout.device_list_item, parent, false);
|
||||
convertView = inflater.inflate(R.layout.item_device_list, parent, false);
|
||||
}
|
||||
|
||||
TextView name = (TextView) convertView.findViewById(R.id.name);
|
||||
|
|
|
@ -31,7 +31,7 @@ public class FoldersAdapter extends ArrayAdapter<RestApi.Folder>
|
|||
};
|
||||
|
||||
public FoldersAdapter(Context context) {
|
||||
super(context, R.layout.folder_list_item);
|
||||
super(context, R.layout.item_folder_list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -39,7 +39,7 @@ public class FoldersAdapter extends ArrayAdapter<RestApi.Folder>
|
|||
if (convertView == null) {
|
||||
LayoutInflater inflater = (LayoutInflater) getContext()
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = inflater.inflate(R.layout.folder_list_item, parent, false);
|
||||
convertView = inflater.inflate(R.layout.item_folder_list, parent, false);
|
||||
}
|
||||
|
||||
TextView id = (TextView) convertView.findViewById(R.id.id);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:persistent="false"
|
||||
android:key="device_id"
|
||||
android:title="@string/device_id"
|
||||
android:widgetLayout="@layout/scan_qr_code_widget" />
|
||||
android:widgetLayout="@layout/pref_widget_scan_qr_code" />
|
||||
|
||||
<EditTextPreference
|
||||
android:persistent="false"
|
||||
|
|
Loading…
Reference in a new issue