Compare commits
6 Commits
i2p-androi
...
i2p-androi
Author | SHA1 | Date | |
---|---|---|---|
48d9afea41 | |||
da4ed503c8 | |||
78a0a2b5f4 | |||
42202cc4d2 | |||
49f4562bf7 | |||
ca6031ab47 |
18
CHANGELOG
18
CHANGELOG
@ -1,3 +1,21 @@
|
|||||||
|
2.8.0
|
||||||
|
* Update I2P Library
|
||||||
|
* Migrate to AndroidX
|
||||||
|
* Migrate to MagicIndicator
|
||||||
|
|
||||||
|
2.7.1
|
||||||
|
* Update I2P Library
|
||||||
|
* Roll back ViewPageIndicator version, fixes crash, causes other issues
|
||||||
|
|
||||||
|
2.7.0
|
||||||
|
* Update I2P Library
|
||||||
|
|
||||||
|
2.6.0
|
||||||
|
* Update I2P Library
|
||||||
|
|
||||||
|
2.5.0
|
||||||
|
* Update I2P Library
|
||||||
|
|
||||||
2.4.0
|
2.4.0
|
||||||
* Update I2P Library
|
* Update I2P Library
|
||||||
|
|
||||||
|
28
LICENSE.txt
28
LICENSE.txt
@ -43,8 +43,34 @@ License for the Android App:
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
|
See the file licenses/LICENSE-Apache2.0.txt
|
||||||
|
|
||||||
|
===================================
|
||||||
|
|
||||||
|
License for the MagicIndicator library:
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2016 hackware1993
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
|
|
||||||
See the file licenses/LICENSE-Apache2.0.txt
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
package net.i2p.android;
|
package net.i2p.android;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.content.pm.ActivityInfo;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
//import android.support.v4.app.Fragment;
|
//import android.support.v4.app.Fragment;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
@ -59,7 +57,6 @@ public class I2PActivity extends I2PActivityBase implements
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
|
||||||
setContentView(R.layout.activity_viewpager);
|
setContentView(R.layout.activity_viewpager);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.main_toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.main_toolbar);
|
||||||
|
@ -8,8 +8,6 @@ import androidx.core.util.Pair;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
//import android.support.v7.widget.RecyclerView;
|
//import android.support.v7.widget.RecyclerView;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -75,7 +73,6 @@ public class TunnelEntryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||||||
|
|
||||||
public void setTunnels(List<TunnelEntry> tunnels) {
|
public void setTunnels(List<TunnelEntry> tunnels) {
|
||||||
mTunnels = tunnels;
|
mTunnels = tunnels;
|
||||||
Log.d("TunnelEntryAdapter", "setTunnels: size=" + (tunnels != null ? tunnels.size() : "null"));
|
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,8 +148,6 @@ public class TunnelEntryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||||||
// Replace the contents of a view (invoked by the layout manager)
|
// Replace the contents of a view (invoked by the layout manager)
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
|
public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
|
||||||
Log.d("TunnelEntryAdapter", "onBindViewHolder: position=" + position +
|
|
||||||
" viewType=" + holder.getItemViewType());
|
|
||||||
switch (holder.getItemViewType()) {
|
switch (holder.getItemViewType()) {
|
||||||
case R.string.router_not_running:
|
case R.string.router_not_running:
|
||||||
((TextView) holder.itemView).setText(
|
((TextView) holder.itemView).setText(
|
||||||
@ -230,11 +225,9 @@ public class TunnelEntryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||||||
// Return the size of the dataset (invoked by the layout manager)
|
// Return the size of the dataset (invoked by the layout manager)
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
if (mTunnels == null || mTunnels.isEmpty()) {
|
if (mTunnels == null || mTunnels.isEmpty())
|
||||||
Log.d("TunnelEntryAdapter", "getItemCount: returning 1 for empty/null state");
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
Log.d("TunnelEntryAdapter", "getItemCount: returning " + mTunnels.size());
|
|
||||||
return mTunnels.size();
|
return mTunnels.size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,10 +120,9 @@ public class TunnelListFragment extends Fragment implements
|
|||||||
@Override
|
@Override
|
||||||
public void onActivityCreated(Bundle savedInstanceState) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
//mClientTunnels = getArguments().getBoolean(SHOW_CLIENT_TUNNELS);
|
mClientTunnels = getArguments().getBoolean(SHOW_CLIENT_TUNNELS);
|
||||||
mClientTunnels = true;
|
|
||||||
|
|
||||||
//mRecyclerView.setHasFixedSize(true);
|
mRecyclerView.setHasFixedSize(true);
|
||||||
mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
|
mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
|
||||||
|
|
||||||
// use a linear layout manager
|
// use a linear layout manager
|
||||||
|
@ -134,10 +134,6 @@ public class TunnelsContainer extends Fragment implements
|
|||||||
// Initialize ViewPager and adapter
|
// Initialize ViewPager and adapter
|
||||||
mFragPagerAdapter = new TunnelsPagerAdapter(getChildFragmentManager());
|
mFragPagerAdapter = new TunnelsPagerAdapter(getChildFragmentManager());
|
||||||
mViewPager.setAdapter(mFragPagerAdapter);
|
mViewPager.setAdapter(mFragPagerAdapter);
|
||||||
// Make sure the ViewPager has proper height
|
|
||||||
/*mViewPager.setLayoutParams(new ViewGroup.LayoutParams(
|
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT));*/
|
|
||||||
|
|
||||||
setupMagicIndicator();
|
setupMagicIndicator();
|
||||||
|
|
||||||
@ -305,17 +301,17 @@ public class TunnelsContainer extends Fragment implements
|
|||||||
.replace(R.id.detail_fragment, detailFrag)
|
.replace(R.id.detail_fragment, detailFrag)
|
||||||
.commitNow(); // Use commitNow() to execute synchronously
|
.commitNow(); // Use commitNow() to execute synchronously
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// This exception might occur if the fragment transaction fails due to an invalid state.
|
|
||||||
// It is handled by logging the error to help with debugging.
|
|
||||||
Log.e("TunnelsContainer", "Failed to update detail fragment", e);
|
Log.e("TunnelsContainer", "Failed to update detail fragment", e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// In single-pane mode, simply start the detail activity
|
// In single-pane mode, simply start the detail activity
|
||||||
// for the selected item ID.
|
// for the selected item ID.
|
||||||
Intent detailIntent = new Intent(getActivity(), TunnelDetailActivity.class);
|
Intent detailIntent = new Intent(getActivity(), TunnelDetailActivity.class);
|
||||||
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(getActivity(), pairs);
|
detailIntent.putExtra(TunnelDetailFragment.TUNNEL_ID, tunnelId);
|
||||||
detailIntent.putExtra("tunnel_id", tunnelId);
|
|
||||||
ActivityCompat.startActivity(getActivity().getApplicationContext(), detailIntent, options.toBundle());
|
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(
|
||||||
|
getActivity(), pairs);
|
||||||
|
ActivityCompat.startActivity(getActivity(), detailIntent, options.toBundle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ package net.i2p.android.preferences.util;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
//import android.support.v7.preference.ListPreference;
|
//import android.support.v7.preference.ListPreference;
|
||||||
import android.preference.ListPreference;
|
import androidx.preference.ListPreference;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
public class IntListPreference extends ListPreference {
|
public class IntListPreference extends ListPreference {
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:minHeight="?android:attr/listPreferredItemHeight">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
style="@style/ListItem.TwoLines"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<RelativeLayout style="@style/ListItem.TwoLines">
|
||||||
|
|
||||||
<!-- Tunnel status -->
|
<!-- Tunnel status -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/tunnel_status"
|
android:id="@+id/tunnel_status"
|
||||||
@ -59,7 +55,5 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground" />
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true" />
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
ANDROID_BUILD_SDK_VERSION=34
|
ANDROID_BUILD_SDK_VERSION=34
|
||||||
ANDROID_BUILD_TARGET_SDK_VERSION=34
|
ANDROID_BUILD_TARGET_SDK_VERSION=34
|
||||||
GROUP=net.i2p.android
|
GROUP=net.i2p.android
|
||||||
I2P_ANDROID_VERSION=2.8.0
|
I2P_ANDROID_VERSION=2.8.2
|
||||||
I2P_ANDROID_VERSION_CODE=4745291
|
I2P_ANDROID_VERSION_CODE=4745293
|
||||||
I2P_VERSION=2.8.0-1
|
I2P_VERSION=2.8.2-1
|
||||||
POM_DEVELOPER_EMAIL=hankhill19580@gmail.com
|
POM_DEVELOPER_EMAIL=hankhill19580@gmail.com
|
||||||
POM_DEVELOPER_ID=idk
|
POM_DEVELOPER_ID=idk
|
||||||
POM_DEVELOPER_NAME=idk
|
POM_DEVELOPER_NAME=idk
|
||||||
|
Reference in New Issue
Block a user