open ttrss url when clicking on a account icon
This commit is contained in:
parent
ff8c1ad1dc
commit
a8280107e4
@ -6,8 +6,10 @@ import android.app.AlertDialog;
|
|||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
@ -241,6 +243,21 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
|
|||||||
server.setText("");
|
server.setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
View account = view.findViewById(R.id.drawer_header_account);
|
||||||
|
|
||||||
|
account.setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
try {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_VIEW,
|
||||||
|
Uri.parse(m_prefs.getString("ttrss_url", "")));
|
||||||
|
startActivity(intent);
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
} catch (InflateException e) {
|
} catch (InflateException e) {
|
||||||
// welp couldn't inflate header i guess
|
// welp couldn't inflate header i guess
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:background="@drawable/circle_bg"
|
android:background="@drawable/circle_bg"
|
||||||
|
android:clickable="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
@ -27,6 +28,8 @@
|
|||||||
android:elevation="4dp">
|
android:elevation="4dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/drawer_header_account"
|
||||||
|
android:background="@drawable/ripple"
|
||||||
android:layout_width="36dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:tint="?colorAccent"
|
android:tint="?colorAccent"
|
||||||
|
Loading…
Reference in New Issue
Block a user