当前位置: 首页>>代码示例>>Java>>正文


Java StandOutWindow类代码示例

本文整理汇总了Java中wei.mark.standout.StandOutWindow的典型用法代码示例。如果您正苦于以下问题:Java StandOutWindow类的具体用法?Java StandOutWindow怎么用?Java StandOutWindow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StandOutWindow类属于wei.mark.standout包,在下文中一共展示了StandOutWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onDestroy

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
@Override
public void onDestroy() {
	super.onDestroy();

	if (twitter != null) {
		windowManager.removeView(twitter);
		twitter = null;
	}
	notificationManager.cancel(0);

	save("on", "false");
	save("chatheadon", "false");
	loadon();

	StandOutWindow.closeAll(ChatHead.this, FloatingActivity.class);

}
 
开发者ID:Pi-Developers,项目名称:Floata-Client,代码行数:18,代码来源:Chathead.java

示例2: onReceiveData

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
@Override
public void onReceiveData(int id, int requestCode, Bundle data,
		Class<? extends StandOutWindow> fromCls, int fromId) {
	// receive data from WidgetsWindow's button press
	// to show off the data sending framework
	switch (requestCode) {
		case WidgetsWindow.DATA_CHANGED_TEXT:
			Window window = getWindow(id);
			if (window == null) {
				String errorText = String.format(Locale.US,
						"%s received data but Window id: %d is not open.",
						getAppName(), id);
				Toast.makeText(this, errorText, Toast.LENGTH_SHORT).show();
				return;
			}
			String changedText = data.getString("changedText");
			TextView status = (TextView) window.findViewById(R.id.id);
			status.setTextSize(20);
			status.setText("Received data from WidgetsWindow: "
					+ changedText);
			break;
		default:
			Log.d("MultiWindow", "Unexpected data received.");
			break;
	}
}
 
开发者ID:keger,项目名称:StandOutWindow,代码行数:27,代码来源:MultiWindow.java

示例3: onProgressChanged

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
	int newValue = progress + mMinValue;

	if (newValue > mMaxValue)
		newValue = mMaxValue;
	else if (newValue < mMinValue)
		newValue = mMinValue;
	else if (mInterval != 1 && newValue % mInterval != 0)
		newValue = Math.round(((float) newValue) / mInterval) * mInterval;

	// change rejected, revert to the previous value
	if (!callChangeListener(newValue)) {
		seekBar.setProgress(mCurrentValue - mMinValue);
		return;
	}

	// change accepted, store it
	mCurrentValue = newValue;
	mStatusText.setText(String.valueOf(pxFromDp(newValue)));
	persistInt(newValue);
	// Refresh the corners to apply the new radius
	StandOutWindow.sendData(context, Corner.class, Corner.wildcard, Corner.UPDATE_CODE, new Bundle(), Corner.class, StandOutWindow.DISREGARD_ID);
}
 
开发者ID:MohammadAdib,项目名称:Roundr,代码行数:25,代码来源:SeekBarPreference.java

示例4: onCreate

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
	if (!BootReceiver.boot_up || Corner.running) {
		Intent i = new Intent(this, SettingsActivity.class);
		startActivity(i);
	}
	if (prefs.getBoolean("enable", true)) {
		StandOutWindow.show(this, Corner.class, 0);
		StandOutWindow.show(this, Corner.class, 1);
		StandOutWindow.show(this, Corner.class, 2);
		StandOutWindow.show(this, Corner.class, 3);
	}
	finish();
}
 
开发者ID:MohammadAdib,项目名称:Roundr,代码行数:17,代码来源:MainActivity.java

示例5: createAndAttachView

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
@Override
public void createAndAttachView(int id, FrameLayout frame) {

	// create a new layout from body.xml
	LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
	View view = inflater.inflate(R.layout.dialog, frame, true);

	ImageView PinBtn = (ImageView) view.findViewById(R.id.pinit);

	PinBtn.setOnClickListener(new OnClickListener() {
		@Override
		public void onClick(View v) {
			Log.d("PopBell", "DialogWindow Pinit Button");
			StandOutWindow.closeAll(DialogWindow.this,
					PinedDialogWindow.class);
			StandOutWindow.show(DialogWindow.this, PinedDialogWindow.class,
					StandOutWindow.DEFAULT_ID);
			stopSelf();
		}
	});

}
 
开发者ID:SimpleMinds,项目名称:PopBell,代码行数:23,代码来源:DialogWindow.java

示例6: checkDatabase

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
private void checkDatabase() {
    DatabaseHelper dbHelper = new DatabaseHelper(getApplicationContext());
    try {
        // Get all the remotes from the Database
        dbHelper.open();
        Cursor cur = dbHelper.getAllRemotes();
        if(cur.getCount() != 0)
        {
            StandOutWindow.closeAll(this, StandOutRemoteActivity.class);
            StandOutWindow.show(this, StandOutRemoteActivity.class, StandOutWindow.DEFAULT_ID);
        }
        cur.close();
        dbHelper.close();
    } catch (SQLException e) {
        e.printStackTrace();
    }
}
 
开发者ID:lowtraxx,项目名称:TSRemote,代码行数:18,代码来源:ConfigurationActivity.java

示例7: onActivityResult

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode,
                                Intent data) {
    if (resultCode == RESULT_OK ) {
        if (requestCode == REQUEST_PICK_APPWIDGET) {
            configureWidget(data);
        }
        else if (requestCode == REQUEST_CREATE_APPWIDGET) {
            smAppWidgetHost = mAppWidgetHost;
            smAppWidgetManager = mAppWidgetManager;
            widget = data;
            if(widget == null && BuildConfig.DEBUG) Log.e("Floating Widgets","Fasten seat belts and prepare for crash");
            StandOutWindow.show(this,FloatingWidget.class,++id);
            finish();
        }
    }
    else if (resultCode == RESULT_CANCELED && data != null) {
        int appWidgetId =
                data.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);
        if (appWidgetId != -1) {
            mAppWidgetHost.deleteAppWidgetId(appWidgetId);
        }
    }
}
 
开发者ID:sakchhams,项目名称:widgets,代码行数:25,代码来源:PickAppWidgets.java

示例8: configureWidget

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
private void configureWidget(Intent data) {
    Bundle extras = data.getExtras();
    int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);
    AppWidgetProviderInfo appWidgetInfo =
            mAppWidgetManager.getAppWidgetInfo(appWidgetId);
    if (appWidgetInfo.configure != null) {
        Intent intent =
                new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
        intent.setComponent(appWidgetInfo.configure);
        intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
        startActivityForResult(intent, REQUEST_CREATE_APPWIDGET);
    } else {
        smAppWidgetHost = mAppWidgetHost;
        smAppWidgetManager = mAppWidgetManager;
        widget = data;
        if(widget == null) Log.e("Floating Widgets","Fasten seat belts and prepare for crash");
        StandOutWindow.show(this,FloatingWidget.class,++id);
        finish();
    }
}
 
开发者ID:sakchhams,项目名称:widgets,代码行数:21,代码来源:PickAppWidgets.java

示例9: onDoubleTap

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
@Override
public boolean onDoubleTap(int id, Window window, MotionEvent event) {
    Set<Integer> ids = StandOutWindow.sWindowCache.getCacheIds(FloatingWidget.class);
    for (int i: ids)
    {
        if (i != FLOAT_UNIQUE_ID)
        {
            //Send data to the Floating Widget service to restore the hidden Widgets
            getStandOutContext().sendData(FLOAT_UNIQUE_ID,FloatingWidget.class,i,0,null);
            IS_MINIMIZED = false;
            break;
        }
    }
    stopSelf();
    return super.onDoubleTap(id, window, event);
}
 
开发者ID:sakchhams,项目名称:widgets,代码行数:17,代码来源:FloatObject.java

示例10: getAddRunnable

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
@Override
public Runnable getAddRunnable(int id) {
    return new Runnable() {
        @Override
        public void run() {
            StandOutWindow.show(FloatingSticky.this.getApplicationContext(), FloatingSticky.class, getUniqueId());
        }
    };
}
 
开发者ID:tuyendt6,项目名称:WindowsNoteMaster,代码行数:10,代码来源:FloatingSticky.java

示例11: onCreate

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    StandOutWindow.closeAll(this, ToggleWindow.class);
    StandOutWindow.show(this, ToggleWindow.class, StandOutWindow.DEFAULT_ID);

    finish();
}
 
开发者ID:ObsidianX,项目名称:xposed-spenonly,代码行数:10,代码来源:ShowWindowActivity.java

示例12: onCreate

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);

	StandOutWindow.closeAll(this, SimpleWindow.class);
	StandOutWindow.closeAll(this, MultiWindow.class);
	StandOutWindow.closeAll(this, WidgetsWindow.class);

	// show a MultiWindow, SimpleWindow

	StandOutWindow
			.show(this, SimpleWindow.class, StandOutWindow.DEFAULT_ID);
	StandOutWindow.show(this, MultiWindow.class, StandOutWindow.DEFAULT_ID);
	StandOutWindow.show(this, WidgetsWindow.class,
			StandOutWindow.DEFAULT_ID);

	// show a MostBasicWindow. It is commented out because it does not
	// support closing.

	/*
	 * StandOutWindow.show(this, StandOutMostBasicWindow.class,
	 * StandOutWindow.DEFAULT_ID);
	 */

	finish();
}
 
开发者ID:keger,项目名称:StandOutWindow,代码行数:28,代码来源:StandOutExampleActivity.java

示例13: onCreate

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);

	StandOutWindow.closeAll(this, FloatingFolder.class);
	FloatingFolder.showFolders(this);
	
	finish();
}
 
开发者ID:keger,项目名称:StandOutWindow,代码行数:11,代码来源:FloatingFoldersLauncher.java

示例14: onStartCommand

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
	if (intent != null) {
		String action = intent.getAction();
		int corner = intent.getIntExtra("id", DEFAULT_ID);
		if (corner == ONGOING_NOTIFICATION_ID) {
			throw new RuntimeException("ID cannot equals StandOutWindow.ONGOING_NOTIFICATION_ID");
		}

		if (ACTION_SHOW.equals(action) || ACTION_RESTORE.equals(action)) {
			show(corner);
		} else if (ACTION_SETTINGS.equals(action)) {
			try {
				Intent intentS = new Intent(this, SettingsActivity.class);
				intentS.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
				startActivity(intentS);
			} catch (Exception e) {
				// Addressing this issue: http://i.imgur.com/Op9kfy8.png
			}
		} else if (ACTION_HIDE.equals(action)) {
			hide(corner);
		} else if (ACTION_CLOSE.equals(action)) {
			close(corner);
		} else if (ACTION_CLOSE_ALL.equals(action)) {
			closeAll();
		} else if (ACTION_SEND_DATA.equals(action)) {
			if (isExistingId(corner) || corner == DISREGARD_ID) {
				Bundle data = intent.getBundleExtra("wei.mark.standout.data");
				int requestCode = intent.getIntExtra("requestCode", 0);
				@SuppressWarnings("unchecked")
				Class<? extends StandOutWindow> fromCls = (Class<? extends StandOutWindow>) intent.getSerializableExtra("wei.mark.standout.fromCls");
				int fromId = intent.getIntExtra("fromId", DEFAULT_ID);
				onReceiveData(corner, requestCode, data, fromCls, fromId);
			}
		}
	}
	return START_NOT_STICKY;
}
 
开发者ID:MohammadAdib,项目名称:Roundr,代码行数:39,代码来源:Corner.java

示例15: OpenPinedWindow

import wei.mark.standout.StandOutWindow; //导入依赖的package包/类
public Runnable OpenPinedWindow(int id) {
	return new Runnable() {
		@Override
		public void run() {
			StandOutWindow.show(PinedDialogWindow.this.getApplicationContext(), PinedDialogWindow.class, getUniqueId());
		}
	};
}
 
开发者ID:SimpleMinds,项目名称:PopBell,代码行数:9,代码来源:PinedDialogWindow.java


注:本文中的wei.mark.standout.StandOutWindow类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。