DF1E
9 years ago
4 changed files with 44 additions and 283 deletions
@ -1,72 +0,0 @@ |
|||||||
/* |
|
||||||
* Copyright 2014 A.C.R. Development |
|
||||||
*/ |
|
||||||
package acr.browser.lightning.activity; |
|
||||||
|
|
||||||
import android.content.Intent; |
|
||||||
import android.net.Uri; |
|
||||||
import android.os.Bundle; |
|
||||||
import android.support.v7.widget.Toolbar; |
|
||||||
import android.view.MenuItem; |
|
||||||
import android.view.View; |
|
||||||
|
|
||||||
import acr.browser.lightning.R; |
|
||||||
|
|
||||||
/* |
|
||||||
*NOTE: This activity must not be removed in order to comply with the Mozilla Public License v. 2.0 |
|
||||||
*under which this code is licensed. Unless you plan on providing other attribution in the app to |
|
||||||
*the original source in another visible way, it is advised against the removal of this Activity. |
|
||||||
*/ |
|
||||||
public class LicenseActivity extends ThemableSettingsActivity implements View.OnClickListener { |
|
||||||
|
|
||||||
@Override |
|
||||||
protected void onCreate(Bundle savedInstanceState) { |
|
||||||
super.onCreate(savedInstanceState); |
|
||||||
setContentView(R.layout.license_activity); |
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); |
|
||||||
setSupportActionBar(toolbar); |
|
||||||
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
|
||||||
findViewById(R.id.browserLicense).setOnClickListener(this); |
|
||||||
findViewById(R.id.licenseAOSP).setOnClickListener(this); |
|
||||||
findViewById(R.id.licenseHosts).setOnClickListener(this); |
|
||||||
findViewById(R.id.licenseOrbot).setOnClickListener(this); |
|
||||||
findViewById(R.id.licenseSnactory).setOnClickListener(this); |
|
||||||
findViewById(R.id.licenseJsoup).setOnClickListener(this); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onClick(View v) { |
|
||||||
switch (v.getId()) { |
|
||||||
case R.id.browserLicense: |
|
||||||
actionView("http://www.mozilla.org/MPL/2.0/"); |
|
||||||
break; |
|
||||||
case R.id.licenseAOSP: |
|
||||||
actionView("http://www.apache.org/licenses/LICENSE-2.0"); |
|
||||||
break; |
|
||||||
case R.id.licenseHosts: |
|
||||||
actionView("http://hosts-file.net/"); |
|
||||||
break; |
|
||||||
case R.id.licenseOrbot: |
|
||||||
actionView("http://www.gnu.org/licenses/lgpl.html"); |
|
||||||
break; |
|
||||||
case R.id.licenseSnactory: |
|
||||||
actionView("http://www.apache.org/licenses/LICENSE-2.0"); |
|
||||||
break; |
|
||||||
case R.id.licenseJsoup: |
|
||||||
actionView("http://jsoup.org/license"); |
|
||||||
break; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
private void actionView(String url) { |
|
||||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url), this, MainActivity.class)); |
|
||||||
finish(); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public boolean onOptionsItemSelected(MenuItem item) { |
|
||||||
finish(); |
|
||||||
return super.onOptionsItemSelected(item); |
|
||||||
} |
|
||||||
} |
|
@ -1,200 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="match_parent" |
|
||||||
android:orientation="vertical" > |
|
||||||
<include layout="@layout/toolbar_settings" /> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:id="@+id/browserLicense" |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:background="?attr/listChoiceBackgroundIndicator" |
|
||||||
android:orientation="vertical" |
|
||||||
android:paddingBottom="10dp" |
|
||||||
android:paddingTop="10dp" > |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/app_name" |
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/mpl_license" |
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" |
|
||||||
android:textColor="@color/light" /> |
|
||||||
</LinearLayout> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="1dp" |
|
||||||
android:layout_marginLeft="10dp" |
|
||||||
android:layout_marginRight="10dp" |
|
||||||
android:background="?attr/dividerColor" /> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:id="@+id/licenseAOSP" |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:background="?attr/listChoiceBackgroundIndicator" |
|
||||||
android:orientation="vertical" |
|
||||||
android:paddingBottom="10dp" |
|
||||||
android:paddingTop="10dp" > |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/android_open_source_project" |
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/apache" |
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" |
|
||||||
android:textColor="@color/light" /> |
|
||||||
</LinearLayout> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="1dp" |
|
||||||
android:layout_marginLeft="10dp" |
|
||||||
android:layout_marginRight="10dp" |
|
||||||
android:background="?attr/dividerColor" /> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:id="@+id/licenseHosts" |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:background="?attr/listChoiceBackgroundIndicator" |
|
||||||
android:orientation="vertical" |
|
||||||
android:paddingBottom="10dp" |
|
||||||
android:paddingTop="10dp" > |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/hphosts_ad_server_list" |
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/freeware" |
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" |
|
||||||
android:textColor="@color/light" /> |
|
||||||
</LinearLayout> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="1dp" |
|
||||||
android:layout_marginLeft="10dp" |
|
||||||
android:layout_marginRight="10dp" |
|
||||||
android:background="?attr/dividerColor" /> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:id="@+id/licenseOrbot" |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:background="?attr/listChoiceBackgroundIndicator" |
|
||||||
android:orientation="vertical" |
|
||||||
android:paddingBottom="10dp" |
|
||||||
android:paddingTop="10dp" > |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/library_netcipher" |
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/license_gnu" |
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" |
|
||||||
android:textColor="@color/light" /> |
|
||||||
</LinearLayout> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="1dp" |
|
||||||
android:layout_marginLeft="10dp" |
|
||||||
android:layout_marginRight="10dp" |
|
||||||
android:background="?attr/dividerColor" /> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:id="@+id/licenseSnactory" |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:background="?attr/listChoiceBackgroundIndicator" |
|
||||||
android:orientation="vertical" |
|
||||||
android:paddingBottom="10dp" |
|
||||||
android:paddingTop="10dp" > |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/snacktory" |
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/apache" |
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" |
|
||||||
android:textColor="@color/light" /> |
|
||||||
</LinearLayout> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="1dp" |
|
||||||
android:layout_marginLeft="10dp" |
|
||||||
android:layout_marginRight="10dp" |
|
||||||
android:background="?attr/dividerColor" /> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:id="@+id/licenseJsoup" |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:background="?attr/listChoiceBackgroundIndicator" |
|
||||||
android:orientation="vertical" |
|
||||||
android:paddingBottom="10dp" |
|
||||||
android:paddingTop="10dp" > |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/jsoup" |
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" /> |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:paddingLeft="16dp" |
|
||||||
android:text="@string/mit_license" |
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" |
|
||||||
android:textColor="@color/light" /> |
|
||||||
</LinearLayout> |
|
||||||
|
|
||||||
<LinearLayout |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="1dp" |
|
||||||
android:layout_marginLeft="10dp" |
|
||||||
android:layout_marginRight="10dp" |
|
||||||
android:background="?attr/dividerColor" /> |
|
||||||
|
|
||||||
</LinearLayout> |
|
Loading…
Reference in new issue