mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-30 08:11:17 +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);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
setContentView(R.layout.folder_picker_activity);
|
setContentView(R.layout.activity_folder_picker);
|
||||||
mListView = (ListView) findViewById(android.R.id.list);
|
mListView = (ListView) findViewById(android.R.id.list);
|
||||||
mListView.setOnItemClickListener(this);
|
mListView.setOnItemClickListener(this);
|
||||||
mListView.setEmptyView(findViewById(android.R.id.empty));
|
mListView.setEmptyView(findViewById(android.R.id.empty));
|
||||||
|
|
|
@ -9,7 +9,6 @@ import android.util.Log;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.widget.EditText;
|
|
||||||
|
|
||||||
import android.support.v4.view.MenuItemCompat;
|
import android.support.v4.view.MenuItemCompat;
|
||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
|
@ -18,7 +17,6 @@ import android.widget.TextView;
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.DataOutputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
|
||||||
|
@ -42,7 +40,7 @@ public class LogActivity extends SyncthingActivity {
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
setContentView(R.layout.log_activity);
|
setContentView(R.layout.activity_log);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class MainActivity extends SyncthingActivity
|
||||||
mDisabledDialog = SyncthingService.showDisabledDialog(MainActivity.this);
|
mDisabledDialog = SyncthingService.showDisabledDialog(MainActivity.this);
|
||||||
} else if (mLoadingDialog == null) {
|
} else if (mLoadingDialog == null) {
|
||||||
LayoutInflater inflater = getLayoutInflater();
|
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);
|
TextView loadingText = (TextView) dialogLayout.findViewById(R.id.loading_text);
|
||||||
loadingText.setText((getService().isFirstStart())
|
loadingText.setText((getService().isFirstStart())
|
||||||
? R.string.web_gui_creating_key
|
? R.string.web_gui_creating_key
|
||||||
|
@ -194,7 +194,7 @@ public class MainActivity extends SyncthingActivity
|
||||||
final ActionBar actionBar = getSupportActionBar();
|
final ActionBar actionBar = getSupportActionBar();
|
||||||
|
|
||||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||||
setContentView(R.layout.main_activity);
|
setContentView(R.layout.activity_main);
|
||||||
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||||
|
|
||||||
mViewPager = (ViewPager) findViewById(R.id.pager);
|
mViewPager = (ViewPager) findViewById(R.id.pager);
|
||||||
|
@ -375,7 +375,7 @@ public class MainActivity extends SyncthingActivity
|
||||||
@Override
|
@Override
|
||||||
public void onReceiveUsageReport(String report) {
|
public void onReceiveUsageReport(String report) {
|
||||||
View v = LayoutInflater.from(MainActivity.this)
|
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);
|
TextView tv = (TextView) v.findViewById(R.id.example);
|
||||||
tv.setText(report);
|
tv.setText(report);
|
||||||
new AlertDialog.Builder(MainActivity.this)
|
new AlertDialog.Builder(MainActivity.this)
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.nutomic.syncthingandroid.activities;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.graphics.Bitmap;
|
|
||||||
import android.net.http.SslCertificate;
|
import android.net.http.SslCertificate;
|
||||||
import android.net.http.SslError;
|
import android.net.http.SslError;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
@ -17,7 +16,6 @@ import android.webkit.WebViewClient;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
|
||||||
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
||||||
|
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
@ -32,8 +30,6 @@ import java.security.SignatureException;
|
||||||
import java.security.cert.CertificateException;
|
import java.security.cert.CertificateException;
|
||||||
import java.security.cert.CertificateFactory;
|
import java.security.cert.CertificateFactory;
|
||||||
import java.security.cert.X509Certificate;
|
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.
|
* 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) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
setContentView(R.layout.web_gui_activity);
|
setContentView(R.layout.activity_web_gui);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
mLoadingView = findViewById(R.id.loading);
|
mLoadingView = findViewById(R.id.loading);
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI
|
||||||
if (convertView == null) {
|
if (convertView == null) {
|
||||||
LayoutInflater inflater = (LayoutInflater) getContext()
|
LayoutInflater inflater = (LayoutInflater) getContext()
|
||||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
.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);
|
ImageView icon = (ImageView) convertView.findViewById(R.id.icon);
|
||||||
|
@ -114,7 +114,7 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
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);
|
mDeviceId = (TextView) view.findViewById(R.id.device_id);
|
||||||
mCpuUsage = (TextView) view.findViewById(R.id.cpu_usage);
|
mCpuUsage = (TextView) view.findViewById(R.id.cpu_usage);
|
||||||
mRamUsage = (TextView) view.findViewById(R.id.ram_usage);
|
mRamUsage = (TextView) view.findViewById(R.id.ram_usage);
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class DevicesAdapter extends ArrayAdapter<RestApi.Device>
|
||||||
};
|
};
|
||||||
|
|
||||||
public DevicesAdapter(Context context) {
|
public DevicesAdapter(Context context) {
|
||||||
super(context, R.layout.device_list_item);
|
super(context, R.layout.item_device_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,7 +42,7 @@ public class DevicesAdapter extends ArrayAdapter<RestApi.Device>
|
||||||
if (convertView == null) {
|
if (convertView == null) {
|
||||||
LayoutInflater inflater = (LayoutInflater) getContext()
|
LayoutInflater inflater = (LayoutInflater) getContext()
|
||||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
.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);
|
TextView name = (TextView) convertView.findViewById(R.id.name);
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class FoldersAdapter extends ArrayAdapter<RestApi.Folder>
|
||||||
};
|
};
|
||||||
|
|
||||||
public FoldersAdapter(Context context) {
|
public FoldersAdapter(Context context) {
|
||||||
super(context, R.layout.folder_list_item);
|
super(context, R.layout.item_folder_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,7 +39,7 @@ public class FoldersAdapter extends ArrayAdapter<RestApi.Folder>
|
||||||
if (convertView == null) {
|
if (convertView == null) {
|
||||||
LayoutInflater inflater = (LayoutInflater) getContext()
|
LayoutInflater inflater = (LayoutInflater) getContext()
|
||||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
.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);
|
TextView id = (TextView) convertView.findViewById(R.id.id);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:key="device_id"
|
android:key="device_id"
|
||||||
android:title="@string/device_id"
|
android:title="@string/device_id"
|
||||||
android:widgetLayout="@layout/scan_qr_code_widget" />
|
android:widgetLayout="@layout/pref_widget_scan_qr_code" />
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
|
|
Loading…
Reference in a new issue