mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 04:12:08 +01:00
Refactor layout file names
This commit is contained in:
parent
b12e021e99
commit
52d6947d3e
14 changed files with 32 additions and 25 deletions
|
@ -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);
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -125,21 +125,26 @@
|
||||||
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"/>
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:defaultValue="false"
|
<PreferenceScreen
|
||||||
android:key="@string/pref_key__proxy_enabled"
|
android:summary="@string/pref_desc__sub_proxy"
|
||||||
android:summary="@string/pref_desc__proxy_enabled"
|
android:title="@string/pref_title__sub_proxy">
|
||||||
android:title="@string/pref_title__proxy_enabled"/>
|
<CheckBoxPreference
|
||||||
<EditTextPreference
|
android:defaultValue="false"
|
||||||
android:dependency="@string/pref_key__proxy_enabled"
|
android:key="@string/pref_key__proxy_enabled"
|
||||||
android:inputType="textNoSuggestions"
|
android:summary="@string/pref_desc__proxy_enabled"
|
||||||
android:key="@string/pref_key__proxy_host"
|
android:title="@string/pref_title__proxy_enabled"/>
|
||||||
android:title="@string/pref_title__proxy_host"/>
|
<EditTextPreference
|
||||||
<EditTextPreference
|
android:dependency="@string/pref_key__proxy_enabled"
|
||||||
android:dependency="@string/pref_key__proxy_enabled"
|
android:inputType="textNoSuggestions"
|
||||||
android:inputType="number"
|
android:key="@string/pref_key__proxy_host"
|
||||||
android:key="@string/pref_key__proxy_port"
|
android:title="@string/pref_title__proxy_host"/>
|
||||||
android:title="@string/pref_title__proxy_port"/>
|
<EditTextPreference
|
||||||
|
android:dependency="@string/pref_key__proxy_enabled"
|
||||||
|
android:inputType="number"
|
||||||
|
android:key="@string/pref_key__proxy_port"
|
||||||
|
android:title="@string/pref_title__proxy_port"/>
|
||||||
|
</PreferenceScreen>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
|
Loading…
Reference in a new issue