Update the whole thing to use Androidx and MagicIndicator because it's marginally more comprehensible than trying to get ViewPageIndicator 2.4.4 to compile
This commit is contained in:
@ -7,6 +7,7 @@ repositories {
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'net.i2p.android.router'
|
||||
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION as String)
|
||||
defaultConfig {
|
||||
versionCode Integer.parseInt(project.I2P_ANDROID_VERSION_CODE as String)
|
||||
@ -68,22 +69,24 @@ dependencies {
|
||||
implementation "androidx.appcompat:appcompat:1.5.1"
|
||||
implementation "androidx.preference:preference:1.2.0"
|
||||
implementation "androidx.annotation:annotation:1.5.0"
|
||||
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
||||
// Local dependencies
|
||||
implementation project(':lib:client')
|
||||
implementation project(':lib:helper')
|
||||
implementation project(path: ':routerjars', configuration: 'routerjars')
|
||||
// Android Support Repository dependencies
|
||||
def supportVersion = '28.0.0'
|
||||
/*implementation "com.android.support:support-v4:$supportVersion"
|
||||
/*def supportVersion = '28.0.0'
|
||||
implementation "com.android.support:support-v4:$supportVersion"
|
||||
implementation "com.android.support:appcompat-v7:$supportVersion"
|
||||
implementation "com.android.support:preference-v7:$supportVersion"
|
||||
implementation "com.android.support:preference-v14:$supportVersion"
|
||||
implementation "com.android.support:recyclerview-v7:$supportVersion"*/
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
implementation 'com.google.android.material:material:1.9.0'
|
||||
// Remote dependencies
|
||||
implementation 'com.androidplot:androidplot-core:1.5.11'
|
||||
implementation 'com.eowise:recyclerview-stickyheaders:0.5.2@aar'
|
||||
implementation 'com.inkapplications.viewpageindicator:library:2.4.3'
|
||||
//implementation 'com.inkapplications.viewpageindicator:library:2.4.4'
|
||||
implementation 'com.github.hackware1993:MagicIndicator:1.7.0' // for androidx
|
||||
implementation 'com.pnikosis:materialish-progress:1.7'
|
||||
implementation "net.i2p:router:$I2P_VERSION"
|
||||
implementation "net.i2p:i2p:$I2P_VERSION"
|
||||
@ -106,6 +109,22 @@ dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// ...existing code...
|
||||
|
||||
// Force consistent lifecycle versions
|
||||
implementation('androidx.lifecycle:lifecycle-viewmodel:2.5.1')
|
||||
implementation('androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1')
|
||||
|
||||
// Exclude older versions
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
force 'androidx.lifecycle:lifecycle-viewmodel:2.5.1'
|
||||
force 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project.ext.i2pbase = "../i2p.i2p"
|
||||
def Properties props = new Properties()
|
||||
def propFile = new File(project(':routerjars').projectDir, 'local.properties')
|
||||
|
@ -1,6 +1,7 @@
|
||||
package net.i2p.android.i2ptunnel;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
//import android.support.v4.app.ActivityCompat;
|
||||
@ -27,7 +28,16 @@ import android.widget.ImageButton;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.viewpagerindicator.TitlePageIndicator;
|
||||
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||
import net.lucode.hackware.magicindicator.ViewPagerHelper;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ColorTransitionPagerTitleView;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.SimplePagerTitleView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import net.i2p.android.i2ptunnel.preferences.EditTunnelContainerFragment;
|
||||
import net.i2p.android.i2ptunnel.util.TunnelUtil;
|
||||
@ -60,7 +70,7 @@ public class TunnelsContainer extends Fragment implements
|
||||
private boolean mTwoPane;
|
||||
|
||||
ViewPager mViewPager;
|
||||
TitlePageIndicator mPageIndicator;
|
||||
MagicIndicator mPageIndicator;
|
||||
FragmentPagerAdapter mFragPagerAdapter;
|
||||
|
||||
private static final String FRAGMENT_CLIENT = "client_fragment";
|
||||
@ -89,16 +99,17 @@ public class TunnelsContainer extends Fragment implements
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View v = inflater.inflate(R.layout.container_tunnels, container, false);
|
||||
|
||||
mViewPager = (ViewPager) v.findViewById(R.id.pager);
|
||||
TabLayout tabLayout = v.findViewById(R.id.page_indicator);
|
||||
tabLayout.setupWithViewPager(mViewPager);
|
||||
mNewTunnel = (ImageButton) v.findViewById(R.id.promoted_action);
|
||||
mViewPager = v.findViewById(R.id.pager);
|
||||
mPageIndicator = v.findViewById(R.id.magic_indicator);
|
||||
|
||||
mNewTunnel = v.findViewById(R.id.promoted_action);
|
||||
mNewTunnel.setVisibility(showActions() ? View.VISIBLE : View.GONE);
|
||||
|
||||
// Initialize ViewPager adapter
|
||||
mFragPagerAdapter = new TunnelsPagerAdapter(getChildFragmentManager());
|
||||
mViewPager.setAdapter(mFragPagerAdapter);
|
||||
|
||||
if (v.findViewById(R.id.detail_fragment) != null) {
|
||||
// The detail container view will be present only in the
|
||||
// large-screen layouts (res/values-w720dp). If this view
|
||||
// is present, then the activity should be in two-pane mode.
|
||||
mTwoPane = true;
|
||||
}
|
||||
|
||||
@ -109,18 +120,58 @@ public class TunnelsContainer extends Fragment implements
|
||||
savedInstanceState, FRAGMENT_SERVER);
|
||||
}
|
||||
|
||||
setupMagicIndicator();
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
// Add null check for safety
|
||||
if (mPageIndicator == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
mFragPagerAdapter = new TunnelsPagerAdapter(getChildFragmentManager());
|
||||
mViewPager.setAdapter(mFragPagerAdapter);
|
||||
|
||||
// Bind the page indicator to the pager.
|
||||
mPageIndicator.setViewPager(mViewPager);
|
||||
// Replace old indicator setup with MagicIndicator initialization
|
||||
CommonNavigator commonNavigator = new CommonNavigator(getContext());
|
||||
commonNavigator.setAdapter(new CommonNavigatorAdapter() {
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mFragPagerAdapter.getCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerTitleView getTitleView(Context context, final int index) {
|
||||
SimplePagerTitleView simplePagerTitleView = new ColorTransitionPagerTitleView(context);
|
||||
simplePagerTitleView.setText(mFragPagerAdapter.getPageTitle(index));
|
||||
simplePagerTitleView.setNormalColor(ContextCompat.getColor(context,
|
||||
R.color.primary_text_disabled_material_dark));
|
||||
simplePagerTitleView.setSelectedColor(ContextCompat.getColor(context,
|
||||
R.color.primary_text_default_material_dark));
|
||||
simplePagerTitleView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mViewPager.setCurrentItem(index);
|
||||
}
|
||||
});
|
||||
return simplePagerTitleView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerIndicator getIndicator(Context context) {
|
||||
LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||
indicator.setColors(ContextCompat.getColor(context, R.color.primary));
|
||||
return indicator;
|
||||
}
|
||||
});
|
||||
|
||||
mPageIndicator.setNavigator(commonNavigator);
|
||||
ViewPagerHelper.bind(mPageIndicator, mViewPager);
|
||||
//mPageIndicator.setViewPager(mViewPager);
|
||||
|
||||
mNewTunnel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@ -320,4 +371,45 @@ public class TunnelsContainer extends Fragment implements
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setupMagicIndicator() {
|
||||
if (mPageIndicator == null || getContext() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
CommonNavigator commonNavigator = new CommonNavigator(getContext());
|
||||
commonNavigator.setAdapter(new CommonNavigatorAdapter() {
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mFragPagerAdapter.getCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerTitleView getTitleView(Context context, final int index) {
|
||||
SimplePagerTitleView simplePagerTitleView = new ColorTransitionPagerTitleView(context);
|
||||
simplePagerTitleView.setText(mFragPagerAdapter.getPageTitle(index));
|
||||
simplePagerTitleView.setNormalColor(ContextCompat.getColor(context,
|
||||
R.color.primary_text_disabled_material_dark));
|
||||
simplePagerTitleView.setSelectedColor(ContextCompat.getColor(context,
|
||||
R.color.primary_text_default_material_dark));
|
||||
simplePagerTitleView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mViewPager.setCurrentItem(index);
|
||||
}
|
||||
});
|
||||
return simplePagerTitleView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerIndicator getIndicator(Context context) {
|
||||
LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||
indicator.setColors(ContextCompat.getColor(context, R.color.primary));
|
||||
return indicator;
|
||||
}
|
||||
});
|
||||
|
||||
mPageIndicator.setNavigator(commonNavigator);
|
||||
ViewPagerHelper.bind(mPageIndicator, mViewPager);
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
@ -14,24 +14,24 @@
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar" />
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<!-- The main content view -->
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v4.view.PagerTitleStrip
|
||||
<androidx.viewpager.widget.PagerTitleStrip
|
||||
android:id="@+id/pager_title_strip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top" />
|
||||
</android.support.v4.view.ViewPager>
|
||||
</androidx.viewpager.widget.ViewPager>
|
||||
|
||||
<!-- The navigation drawer -->
|
||||
<ListView
|
||||
@ -44,5 +44,5 @@
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
</LinearLayout>
|
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
@ -19,7 +19,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<!-- The main content view -->
|
||||
<FrameLayout
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
@ -19,9 +19,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -68,5 +68,5 @@
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
</LinearLayout>
|
@ -5,7 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
@ -29,9 +29,9 @@
|
||||
android:clipChildren="false"
|
||||
app:shadowDrawable="@drawable/header_shadow">
|
||||
|
||||
<android.support.v4.view.CustomViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<androidx.viewpager.widget.CustomViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</net.i2p.android.widget.DrawShadowFrameLayout>
|
||||
</LinearLayout>
|
@ -13,7 +13,7 @@
|
||||
android:paddingBottom="8dp"
|
||||
android:gravity="fill_horizontal" />
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- The main content view -->
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
@ -1,18 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!--
|
||||
This layout is a two-pane layout for the master/detail
|
||||
flow within a DrawerLayout. See res/values-large/refs.xml
|
||||
and res/values-sw600dp/refs.xml for layout aliases
|
||||
that replace the single-pane version of the layout with
|
||||
this two-pane version.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -22,17 +13,23 @@
|
||||
android:paddingRight="104dp"
|
||||
android:paddingStart="@dimen/listitem_horizontal_margin">
|
||||
|
||||
<!-- The main fragment view -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/pager_indicator_height"
|
||||
android:theme="@style/MagicIndicator" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -67,11 +64,4 @@
|
||||
app:fab_colorNormal="@color/accent"
|
||||
app:fab_colorPressed="@color/accent_dark" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/page_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabMode="fixed"
|
||||
app:tabGravity="fill" />
|
||||
|
||||
</RelativeLayout>
|
@ -5,7 +5,7 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- The main content view -->
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/browser_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/detail_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -35,7 +35,7 @@
|
||||
android:text="Tunnel description"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -93,7 +93,7 @@
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:background="?attr/colorPrimary"
|
||||
@ -151,5 +151,5 @@
|
||||
tools:text="0.0 KBps / 0.0 KB" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</LinearLayout>
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.view.ViewPager
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
<android.support.v4.view.PagerTitleStrip
|
||||
<androidx.viewpager.widget.PagerTitleStrip
|
||||
android:id="@+id/pager_title_strip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top" />
|
||||
</android.support.v4.view.ViewPager>
|
||||
</androidx.viewpager.widget.ViewPager>
|
||||
|
@ -14,4 +14,7 @@
|
||||
<attr name="msbp_defaultValue" format="reference|integer"/>
|
||||
<attr name="msbp_measurementUnit" format="reference|string"/>
|
||||
</declare-styleable>
|
||||
<attr name="footerColor" format="color" />
|
||||
<attr name="selectedBold" format="boolean" />
|
||||
<attr name="selectedColor" format="color" />
|
||||
</resources>
|
@ -22,4 +22,8 @@
|
||||
<color name="step_pager_next_tab_color">#10000000</color>
|
||||
|
||||
<color name="review_green">#ff669900</color>
|
||||
|
||||
<color name="footer_color">#757575</color>
|
||||
<color name="selected_color">#2196F3</color>
|
||||
|
||||
</resources>
|
||||
|
@ -40,4 +40,6 @@
|
||||
|
||||
<dimen name="graph_domain_tick_label_font_size">15dp</dimen>
|
||||
<dimen name="graph_range_tick_label_font_size">15dp</dimen>
|
||||
<dimen name="pager_indicator_height">48dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
@ -24,6 +24,9 @@
|
||||
|
||||
<style name="Theme.I2P" parent="Base.Theme.I2P">
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
||||
<item name="footerColor">@color/footer_color</item>
|
||||
<item name="selectedBold">true</item>
|
||||
<item name="selectedColor">@color/selected_color</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.AppCompat.Primary" parent="TextAppearance.AppCompat.Body1">
|
||||
@ -194,4 +197,8 @@
|
||||
<item name="android:paddingLeft">12dp</item>
|
||||
<item name="android:paddingRight">12dp</item>
|
||||
</style>
|
||||
<style name="MagicIndicator">
|
||||
<item name="android:layout_height">@dimen/pager_indicator_height</item>
|
||||
<item name="android:background">?attr/colorPrimary</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
@ -1,25 +1,33 @@
|
||||
|
||||
GROUP=net.i2p.android
|
||||
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
|
||||
POM_URL=https://github.com/i2p/i2p.android.base
|
||||
POM_SCM_URL=https://github.com/i2p/i2p.android.base
|
||||
POM_SCM_CONNECTION=scm:git:git@github.com:i2p/i2p.android.base.git
|
||||
POM_SCM_DEV_CONNECTION=scm:git:git@github.com:i2p/i2p.android.base.git
|
||||
POM_LICENCE_NAME=The Apache Software License, Version 2.0
|
||||
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
POM_LICENCE_DIST=repo
|
||||
POM_DEVELOPER_ID=idk
|
||||
POM_DEVELOPER_NAME=idk
|
||||
POM_DEVELOPER_EMAIL=hankhill19580@gmail.com
|
||||
|
||||
ANDROID_BUILD_TARGET_SDK_VERSION=34
|
||||
## For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
#
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
# Default value: -Xmx1024m -XX:MaxPermSize=256m
|
||||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
#
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. For more details, visit
|
||||
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
||||
# org.gradle.parallel=true
|
||||
#Sun Mar 09 19:44:44 EDT 2025
|
||||
ANDROID_BUILD_SDK_VERSION=34
|
||||
|
||||
I2P_VERSION=2.8.0-1
|
||||
ANDROID_BUILD_TARGET_SDK_VERSION=34
|
||||
GROUP=net.i2p.android
|
||||
I2P_ANDROID_VERSION=2.8.1
|
||||
I2P_ANDROID_VERSION_CODE=4745290
|
||||
android.disableAutomaticComponentCreation=true
|
||||
I2P_VERSION=2.8.0-1
|
||||
POM_DEVELOPER_EMAIL=hankhill19580@gmail.com
|
||||
POM_DEVELOPER_ID=idk
|
||||
POM_DEVELOPER_NAME=idk
|
||||
POM_LICENCE_DIST=repo
|
||||
POM_LICENCE_NAME=The Apache Software License, Version 2.0
|
||||
POM_LICENCE_URL=http\://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
POM_SCM_CONNECTION=scm\:git\:git@github.com\:i2p/i2p.android.base.git
|
||||
POM_SCM_DEV_CONNECTION=scm\:git\:git@github.com\:i2p/i2p.android.base.git
|
||||
POM_SCM_URL=https\://github.com/i2p/i2p.android.base
|
||||
POM_URL=https\://github.com/i2p/i2p.android.base
|
||||
#android.disableAutomaticComponentCreation=true
|
||||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
|
@ -26,6 +26,7 @@ android {
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
namespace 'net.i2p.android.lib.client'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -2,3 +2,5 @@ POM_NAME=I2P Android client library
|
||||
POM_DESCRIPTION=A client library enabling Android developers to add native I2P support to their apps.
|
||||
POM_ARTIFACT_ID=client
|
||||
POM_PACKAGING=aar
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
@ -22,12 +22,13 @@ android {
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
namespace 'net.i2p.android.lib.helper'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Android Support Repository dependencies
|
||||
def supportVersion = '28.0.0'
|
||||
implementation "com.android.support:support-v4:$supportVersion"
|
||||
//implementation "com.android.support:support-v4:$supportVersion"
|
||||
// Testing-only dependencies
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'org.mockito:mockito-core:2.11.0'
|
||||
|
@ -2,3 +2,5 @@ POM_NAME=I2P Android helper library
|
||||
POM_DESCRIPTION=A helper library enabling Android developers to easily add I2P Android support to their apps.
|
||||
POM_ARTIFACT_ID=helper
|
||||
POM_PACKAGING=aar
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
Reference in New Issue
Block a user