Skip to content

Instantly share code, notes, and snippets.

View itPowerranger's full-sized avatar

itPowerranger

View GitHub Profile
GET https://www.googleapis.com/plus/v1/people/{userId}/activities/public
<style type="text/css">
.post-container {
overflow: auto;
border: thin solid #0F5B01;
margin: 0 20 20 0;
}
.post-content {
margin-bottom:20px;
}
.post-content-header {
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>EXAMPLE: Show g+ posts on my website</title>
</head>
<body>
<h1> MY G+ POSTS </h1>
<?php
/************************
* toggle menu *
************************/
public void toggleMenu(){
if(mLinearLayout.getVisibility() == View.GONE
|| mCategroyBottomOutside.getVisibility() == View.GONE){
showMenu();
} else {
hideMenu();
}
/***********************
* MyMenuDrawer *
************************/
private void initMyMenuDrawer() {
// --- init MyMenuDrawer
FrameLayout baseLayout = (FrameLayout) findViewById(R.id.main_menu);
int layout = R.layout.menu_drawer_layout;
View view = LayoutInflater.from(this).inflate(layout, baseLayout, true);
// --- configure MenuDrawer
<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="match_parent"
android:background="@color/menu_outside_background_color"
android:orientation="horizontal"
>
<ExpandableListView
android:id="@+id/menu_drawer_list"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/root_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:id="@+id/main_fragment"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
// erhalte view des widgets
RemoteViews views = new RemoteViews(context.getPackageName(),
R.layout.appwidget_layout);
Intent intentWidget = new Intent(context, getClass());
// möchte man Inforamtionen mitschicken,
// so kann dies über ein Bundle geamcht werden
PendingIntent pendingIntentWidget = PendingIntent.getBroadcast(context, 0,
intentWidget, 0);
// erhalte view des widgets
RemoteViews views = new RemoteViews(context.getPackageName(),
R.layout.appwidget_layout);
Intent intentActivity = new Intent(context, MainActivity.class);
// möchte man Informationen mitschicken,
// so kann dies über ein Bundle gemacht werden
PendingIntent pendingIntentActivity = PendingIntent.getActivity(context, 0, intentActivity, 0);
// mein Widget enthält ein button
// Quelle: http://stackoverflow.com/questions/13469907/textview-in-android-widget-doesnt-update/13470122#13470122
Intent updateWidget = new Intent(context, ExampleWidgetProvider.class);
updateWidget.setAction("update_widget");
PendingIntent pending = PendingIntent.getBroadCast(context,
0,
updateWidget,
PendingIntent.FLAG_CANCEL_CURRENT);
pending.send();