mirror of
https://github.com/etesync/android
synced 2025-05-28 03:38:48 +00:00
Minor refactoring (lint)
This commit is contained in:
parent
e8cf9fd5ab
commit
7109915e6e
@ -35,14 +35,18 @@ android {
|
||||
|
||||
lintOptions {
|
||||
disable 'ExtraTranslation'
|
||||
disable 'GoogleAppIndexingWarning' // we don't need Google indexing, thanks
|
||||
disable 'GradleDependency'
|
||||
disable 'GradleDynamicVersion'
|
||||
disable 'IconColors'
|
||||
disable 'IconLauncherShape'
|
||||
disable 'IconMissingDensityFolder'
|
||||
disable 'InconsistentLayout'
|
||||
disable 'MergeRootFrame'
|
||||
//disable 'InconsistentLayout'
|
||||
disable 'MissingTranslation'
|
||||
disable 'OldTargetApi'
|
||||
disable 'OldTargetApi' // Android 6 permission model not implemented yet
|
||||
disable 'Recycle' // doesn't understand Lombok's @Cleanup
|
||||
disable 'RtlEnabled'
|
||||
disable 'RtlHardcoded'
|
||||
disable 'Typos'
|
||||
}
|
||||
packagingOptions {
|
||||
|
@ -174,8 +174,10 @@ public class AboutActivity extends AppCompatActivity {
|
||||
public void onLoadFinished(Loader<Spanned> loader, Spanned license) {
|
||||
if (getView() != null) {
|
||||
TextView tv = (TextView)getView().findViewById(R.id.license_text);
|
||||
if (tv != null)
|
||||
if (tv != null) {
|
||||
tv.setAutoLinkMask(Linkify.EMAIL_ADDRESSES | Linkify.WEB_URLS);
|
||||
tv.setText(license);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,6 @@ public class AccountSettingsActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_account_settings);
|
||||
|
||||
account = getIntent().getParcelableExtra(EXTRA_ACCOUNT);
|
||||
setTitle(getString(R.string.settings_title, account.name));
|
||||
@ -45,7 +44,7 @@ public class AccountSettingsActivity extends AppCompatActivity {
|
||||
|
||||
if (savedInstanceState == null)
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.fragment, AccountSettingsFragment.instantiate(this, AccountSettingsFragment.class.getName(), getIntent().getExtras()))
|
||||
.replace(android.R.id.content, AccountSettingsFragment.instantiate(this, AccountSettingsFragment.class.getName(), getIntent().getExtras()))
|
||||
.commit();
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ public class AccountDetailsFragment extends Fragment {
|
||||
ContentResolver.setIsSyncable(account, CalendarContract.AUTHORITY, 1);
|
||||
ContentResolver.setSyncAutomatically(account, CalendarContract.AUTHORITY, true);
|
||||
|
||||
// TODO check for tasks availability
|
||||
// will only do something if OpenTasks is installed
|
||||
ContentResolver.setIsSyncable(account, TaskProvider.ProviderName.OpenTasks.authority, 1);
|
||||
ContentResolver.setSyncAutomatically(account, TaskProvider.ProviderName.OpenTasks.authority, true);
|
||||
} else {
|
||||
|
@ -71,7 +71,7 @@ public class DetectConfigurationFragment extends DialogFragment implements Loade
|
||||
else
|
||||
// service found: continue
|
||||
getFragmentManager().beginTransaction()
|
||||
.replace(R.id.fragment, AccountDetailsFragment.newInstance(data))
|
||||
.replace(android.R.id.content, AccountDetailsFragment.newInstance(data))
|
||||
.addToBackStack(null)
|
||||
.commitAllowingStateLoss();
|
||||
|
||||
|
@ -22,12 +22,11 @@ public class LoginActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.login_activity);
|
||||
|
||||
if (savedInstanceState == null)
|
||||
// first call, add fragment
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.fragment, new LoginCredentialsFragment())
|
||||
.replace(android.R.id.content, new LoginCredentialsFragment())
|
||||
.commit();
|
||||
|
||||
}
|
||||
|
@ -1,13 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="277"
|
||||
android:viewportHeight="277">
|
||||
|
||||
<path
|
||||
android:fillColor="#6aa9e0"
|
||||
android:pathData="M 2198.4655,429.89797 c -80.4733,35.82942 -166.9548,60.04502 -257.7242,70.936
|
||||
<group android:translateY="-0.7250061"
|
||||
tools:ignore="VectorRaster">
|
||||
<group android:scaleX="0.12466422"
|
||||
android:scaleY="0.12466422">
|
||||
<path
|
||||
android:fillColor="#6aa9e0"
|
||||
android:pathData="M 2198.4655,429.89797 c -80.4733,35.82942 -166.9548,60.04502 -257.7242,70.936
|
||||
92.6495,-55.75608 163.7947,-144.04056 197.2992,-249.2398 -86.6974,51.62778
|
||||
-182.7311,89.11977 -284.9407,109.32754 -81.8574,-87.5536 -198.4753,-142.26556
|
||||
-327.5334,-142.26556 -247.8202,0 -448.7354,201.70015 -448.7354,450.48215
|
||||
@ -23,4 +28,6 @@
|
||||
198.581677,127.8136 434.444767,202.3893 687.848917,202.3893 825.36002,0
|
||||
1276.69552,-686.4473 1276.69552,-1281.7474 0,-19.5331 -0.432,-38.96179
|
||||
-1.2961,-58.27803 87.6657,-63.51471 163.7469,-142.85991 223.9079,-233.2005" />
|
||||
</group>
|
||||
</group>
|
||||
</vector>
|
@ -41,8 +41,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license_info"
|
||||
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright © 2013 – 2016 Ricki Hirner (bitfire web engineering).
|
||||
~ All rights reserved. This program and the accompanying materials
|
||||
~ are made available under the terms of the GNU Public License v3.0
|
||||
~ which accompanies this distribution, and is available at
|
||||
~ http://www.gnu.org/licenses/gpl.html
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright © 2013 – 2016 Ricki Hirner (bitfire web engineering).
|
||||
~ All rights reserved. This program and the accompanying materials
|
||||
~ are made available under the terms of the GNU Public License v3.0
|
||||
~ which accompanies this distribution, and is available at
|
||||
~ http://www.gnu.org/licenses/gpl.html
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/fragment">
|
||||
|
||||
</FrameLayout>
|
@ -8,6 +8,7 @@
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
@ -18,7 +19,7 @@
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:contentDescription="@null"
|
||||
android:importantForAccessibility="no">
|
||||
android:importantForAccessibility="no" tools:ignore="UnusedAttribute">
|
||||
<requestFocus/>
|
||||
</View>
|
||||
|
||||
@ -38,7 +39,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login_type_email"
|
||||
android:paddingLeft="14dp"
|
||||
android:paddingLeft="14dp" tools:ignore="RtlSymmetry"
|
||||
style="@style/login_type_headline"/>
|
||||
|
||||
<LinearLayout
|
||||
@ -66,7 +67,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login_type_url"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingLeft="14dp"
|
||||
android:paddingLeft="14dp" tools:ignore="RtlSymmetry"
|
||||
style="@style/login_type_headline"/>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -8,6 +8,7 @@
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/nav_header_height"
|
||||
android:background="@drawable/side_nav_bar"
|
||||
@ -21,7 +22,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||
android:src="@drawable/ic_launcher"/>
|
||||
android:src="@drawable/ic_launcher"
|
||||
tools:ignore="ContentDescription"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@ -34,6 +36,6 @@
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CalDAV/CardDAV Sync Adapter"/>
|
||||
android:text="@string/navigation_drawer_subtitle"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -13,12 +13,12 @@
|
||||
<item android:id="@+id/sync_now"
|
||||
android:icon="@drawable/ic_sync_dark"
|
||||
android:title="@string/account_synchronize_now"
|
||||
app:showAsAction="always"/>
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
<item android:id="@+id/settings"
|
||||
android:icon="@drawable/ic_settings_dark"
|
||||
android:title="@string/account_settings"
|
||||
app:showAsAction="always"/>
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
<item android:id="@+id/delete_account"
|
||||
android:title="@string/account_delete"/>
|
||||
|
@ -8,8 +8,6 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<dimen name="leftcol_width">320dp</dimen>
|
||||
|
||||
<dimen name="activity_margin">16dp</dimen>
|
||||
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
|
@ -1,16 +0,0 @@
|
||||
<!--
|
||||
~ Copyright © 2013 – 2016 Ricki Hirner (bitfire web engineering).
|
||||
~ All rights reserved. This program and the accompanying materials
|
||||
~ are made available under the terms of the GNU Public License v3.0
|
||||
~ which accompanies this distribution, and is available at
|
||||
~ http://www.gnu.org/licenses/gpl.html
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<item name="ic_menu_camera" type="drawable">@android:drawable/ic_menu_camera</item>
|
||||
<item name="ic_menu_gallery" type="drawable">@android:drawable/ic_menu_gallery</item>
|
||||
<item name="ic_menu_slideshow" type="drawable">@android:drawable/ic_menu_slideshow</item>
|
||||
<item name="ic_menu_manage" type="drawable">@android:drawable/ic_menu_manage</item>
|
||||
<item name="ic_menu_share" type="drawable">@android:drawable/ic_menu_share</item>
|
||||
<item name="ic_menu_send" type="drawable">@android:drawable/ic_menu_send</item>
|
||||
</resources>
|
@ -15,7 +15,6 @@
|
||||
<string name="manage_accounts">Manage accounts</string>
|
||||
<string name="please_wait">Please wait …</string>
|
||||
<string name="send">Send</string>
|
||||
<string name="skip">Skip</string>
|
||||
|
||||
<!-- startup dialogs -->
|
||||
<string name="startup_dont_show_again">Don\'t show again</string>
|
||||
|
@ -10,9 +10,6 @@
|
||||
|
||||
<!-- colors -->
|
||||
|
||||
<color name="light_blue_600">#039be5</color>
|
||||
|
||||
<color name="green500">#4caf50</color>
|
||||
<color name="green700">#388e3c</color>
|
||||
|
||||
<color name="light_green300">#aed581</color>
|
||||
@ -22,7 +19,6 @@
|
||||
<color name="orange400">#ffa726</color>
|
||||
<color name="orangeA700">#ff6d00</color>
|
||||
|
||||
<color name="black">#000000</color>
|
||||
<color name="grey">#888888</color>
|
||||
<color name="very_light_grey">#ebebeb</color>
|
||||
<color name="white">#ffffff</color>
|
||||
@ -56,7 +52,7 @@
|
||||
<!-- AddAccountActivity -->
|
||||
|
||||
<style name="login_type_headline">
|
||||
<item name="android:textSize">22dp</item>
|
||||
<item name="android:textSize">22sp</item>
|
||||
</style>
|
||||
<style name="account_list_card">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
|
Loading…
Reference in New Issue
Block a user