1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-22 12:22:08 +01:00

Refactor layout file names

This commit is contained in:
Gregor Santner 2016-09-21 12:36:42 +02:00
parent b12e021e99
commit 52d6947d3e
14 changed files with 32 additions and 25 deletions

View file

@ -71,7 +71,7 @@ public class AboutActivity extends AppCompatActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about); setContentView(R.layout.about__activity);
ButterKnife.bind(this); ButterKnife.bind(this);
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
@ -111,7 +111,7 @@ public class AboutActivity extends AppCompatActivity {
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_about, container, false); View rootView = inflater.inflate(R.layout.about__fragment_about, container, false);
TextView appVersion = (TextView) rootView.findViewById(R.id.fragment_about__app_version); TextView appVersion = (TextView) rootView.findViewById(R.id.fragment_about__app_version);
if (isAdded()) { if (isAdded()) {
@ -143,7 +143,7 @@ public class AboutActivity extends AppCompatActivity {
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_license, container, false); View rootView = inflater.inflate(R.layout.about__fragment_license, container, false);
ButterKnife.bind(this, rootView); ButterKnife.bind(this, rootView);
final Context context = rootView.getContext(); final Context context = rootView.getContext();
accentColor = Helpers.hexColorFromRessourceColor(context, R.color.colorAccent); accentColor = Helpers.hexColorFromRessourceColor(context, R.color.colorAccent);
@ -201,7 +201,7 @@ public class AboutActivity extends AppCompatActivity {
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_debug, container, false); View rootView = inflater.inflate(R.layout.about__fragment_debug, container, false);
TextView packageName = (TextView) rootView.findViewById(R.id.fragment_debug__package_name); TextView packageName = (TextView) rootView.findViewById(R.id.fragment_debug__package_name);
TextView appVersion = (TextView) rootView.findViewById(R.id.fragment_debug__app_version); TextView appVersion = (TextView) rootView.findViewById(R.id.fragment_debug__app_version);
TextView osVersion = (TextView) rootView.findViewById(R.id.fragment_debug__android_version); TextView osVersion = (TextView) rootView.findViewById(R.id.fragment_debug__android_version);

View file

@ -235,7 +235,7 @@ public class MainActivity extends AppCompatActivity
boolean newWebView = (webView == null); boolean newWebView = (webView == null);
if (newWebView) { if (newWebView) {
AppLog.v(this, "WebView was null. Create new one."); AppLog.v(this, "WebView was null. Create new one.");
View webviewHolder = getLayoutInflater().inflate(R.layout.webview, this.contentLayout, false); View webviewHolder = getLayoutInflater().inflate(R.layout.ui__webview, this.contentLayout, false);
this.webView = (ContextMenuWebView) webviewHolder.findViewById(R.id.webView); this.webView = (ContextMenuWebView) webviewHolder.findViewById(R.id.webView);
((LinearLayout) webView.getParent()).removeView(webView); ((LinearLayout) webView.getParent()).removeView(webView);
setupWebView(savedInstanceState); setupWebView(savedInstanceState);
@ -840,7 +840,7 @@ public class MainActivity extends AppCompatActivity
if (WebHelper.isOnline(MainActivity.this)) { if (WebHelper.isOnline(MainActivity.this)) {
final InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); final InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
View layout = getLayoutInflater().inflate(R.layout.dialog_search__people_tags, null, false); View layout = getLayoutInflater().inflate(R.layout.ui__dialog_search__people_tags, null, false);
final EditText input = (EditText) layout.findViewById(R.id.dialog_search__input); final EditText input = (EditText) layout.findViewById(R.id.dialog_search__input);
final DialogInterface.OnClickListener clickListener = new DialogInterface.OnClickListener() { final DialogInterface.OnClickListener clickListener = new DialogInterface.OnClickListener() {
@Override @Override
@ -1249,7 +1249,7 @@ public class MainActivity extends AppCompatActivity
AppLog.v(this, "Apply NetCipher proxy settings"); AppLog.v(this, "Apply NetCipher proxy settings");
NetCipher.setProxy(host, port); //Proxy for HttpsUrlConnections NetCipher.setProxy(host, port); //Proxy for HttpsUrlConnections
try { try {
//Proxy for the webview //Proxy for the ui__webview
AppLog.v(this, "Apply Webkit proxy settings"); AppLog.v(this, "Apply Webkit proxy settings");
WebkitProxy.setProxy(MainActivity.class.getName(), getApplicationContext(), null, host, port); WebkitProxy.setProxy(MainActivity.class.getName(), getApplicationContext(), null, host, port);
} catch (Exception e) { } catch (Exception e) {

View file

@ -224,7 +224,7 @@ public class PodSelectionActivity extends AppCompatActivity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.pods__menu, menu); getMenuInflater().inflate(R.menu.podselection__menu, menu);
return true; return true;
} }

View file

@ -12,7 +12,7 @@ import com.github.dfa.diaspora_android.util.AppLog;
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper; import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
/** /**
* BroadcastReceiver used to update the title of the MainActivity depending on the url of the webview * BroadcastReceiver used to update the title of the MainActivity depending on the url of the ui__webview
* Created by vanitas on 11.09.16. * Created by vanitas on 11.09.16.
*/ */
public class UpdateTitleReceiver extends BroadcastReceiver { public class UpdateTitleReceiver extends BroadcastReceiver {

View file

@ -37,7 +37,7 @@ public class CustomTabActivityHelper {
String packageName = CustomTabsHelper.getPackageNameToUse(activity); String packageName = CustomTabsHelper.getPackageNameToUse(activity);
//If we cant find a package name, it means there's no browser that supports //If we cant find a package name, it means there's no browser that supports
//Chrome Custom Tabs installed. So, we fallback to the webview //Chrome Custom Tabs installed. So, we fallback to the ui__webview
if (packageName == null) { if (packageName == null) {
if (fallback != null) { if (fallback != null) {
fallback.openUri(activity, uri); fallback.openUri(activity, uri);

View file

@ -81,6 +81,8 @@
<string name="pref_desc__load_images">Disable image loading to safe mobile data</string> <string name="pref_desc__load_images">Disable image loading to safe mobile data</string>
<!-- Proxy --> <!-- Proxy -->
<string name="pref_title__sub_proxy">Proxy</string>
<string name="pref_desc__sub_proxy">@string/pref_desc__proxy_enabled</string>
<string name="pref_title__proxy_enabled">Enable Proxy</string> <string name="pref_title__proxy_enabled">Enable Proxy</string>
<string name="pref_desc__proxy_enabled">Proxy Diaspora\'s traffic to circumvent firewalls.\nMay require restart</string> <string name="pref_desc__proxy_enabled">Proxy Diaspora\'s traffic to circumvent firewalls.\nMay require restart</string>
<string name="pref_title__proxy_host">Host</string> <string name="pref_title__proxy_host">Host</string>

View file

@ -125,6 +125,10 @@
android:summary="@string/pref_desc__clear_cache" android:summary="@string/pref_desc__clear_cache"
android:title="@string/pref_title__clear_cache"/> android:title="@string/pref_title__clear_cache"/>
<PreferenceScreen
android:summary="@string/pref_desc__sub_proxy"
android:title="@string/pref_title__sub_proxy">
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pref_key__proxy_enabled" android:key="@string/pref_key__proxy_enabled"
@ -140,6 +144,7 @@
android:inputType="number" android:inputType="number"
android:key="@string/pref_key__proxy_port" android:key="@string/pref_key__proxy_port"
android:title="@string/pref_title__proxy_port"/> android:title="@string/pref_title__proxy_port"/>
</PreferenceScreen>
</PreferenceCategory> </PreferenceCategory>
<!-- More --> <!-- More -->