android-widget

How to Set the Open GLES2.0 to work with the Android Camera?

三世轮回 提交于 2019-12-08 12:58:08
问题 In My Android Camera Application i want to Set some Effect on the Android Camera Preview witht the Help of OPEN GL vertex shader and fragment shader. Is there any example or source code to use the Android camera with Open GLES effect ? ? I have seen this. But I want android camera effect in Only One SurfaceView not on another. Thanks. 回答1: I've done something similar. But the code is quite messy, it was just a prototype. Check it on my github https://github.com/Jaa-c/PDA-Lupa/tree/master/src

access website within android code and retrieve a generated image

落爺英雄遲暮 提交于 2019-12-08 12:47:53
This description was very hard to word. Basically I want to know if it is possible to access a website inside Android coding without actually sending the user to that website. What I want to do is use a free website that generates a random pic after you upload your picture to it. I want the user to be able to upload their selected image to the website, and I guess somehow in code make that website generate an edited image and retrieve it back into the application for further use. I know this sounds really ridiculous but I just wanted to know if this was at all possible before I try writing the

Making a Toggle Button in an AppWidget

空扰寡人 提交于 2019-12-08 12:46:42
问题 I am trying to make a simple toggle button in an appwidget. to do that i want to save the current state and i am using the shared prefs for that .. and yet i still have trouble. The value of the boolean isRecordting is alwasy false here is the on recive: @Override public void onReceive(Context context, Intent intent) { switchToggle(context, intent); super.onReceive(context, intent); } private void switchToggle(Context context, Intent intent) { SharedPreferences prefs = context

How to manage setOnClickListener on a array of buttons

て烟熏妆下的殇ゞ 提交于 2019-12-08 11:42:29
问题 I have a dynamic array of buttons and I would like to know how to handle the onclick on every button? Thanks 回答1: I don't see a need to create a new OnClickListener for each button -- all the buttons could share a single listener. private OnClickListener myListener = new OnClickListener() { public void onClick(View v) { Object tag = v.getTag(); // Do something depending on the value of the tag } }; ... for (int i=0; i < btns.length; ++i) { btns[i].setOnClickListener(myListener); btns[i]

about MultiAutoCompleteTextView

落花浮王杯 提交于 2019-12-08 11:15:30
问题 public class testMultiAutoCompleteTextView extends ListActivity { /** Called when the activity is first created. */ private MultiAutoCompleteTextView searchEdit; Button okButton; private ArrayAdapter<String> adapter = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mStrings); setListAdapter(adapter); searchEdit = (MultiAutoCompleteTextView) findViewById(R.id

how to regain focus on a edit text when expandable list is reloaded…?

天大地大妈咪最大 提交于 2019-12-08 10:44:42
问题 I have a ExpandableListView in which i am loading custom layouts in both group and child views. They are having some edit text fields. When i click on the edit text, the soft keyboard appears, that time the list is reloaded, but focus will not be on the edit text. As a result the input i am typing is not entered in that edit text. If i clicked on the edit text again i can enter the values. But I want to regain its focus even after reloading the list view. I tried with storing the last clicked

How to start an activity by the click on an image in widget?

非 Y 不嫁゛ 提交于 2019-12-08 10:08:35
问题 Intent intent = new Intent( context, ColorConfigure.class); Intent.putExtras(AppWidgetManager.EXTRA_APPWIDGET_ID, appwidgetId ); PendingIntent pi = PendingIntent.getActivity( context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); RemoteViews r = new RemoteViews( context.getPackageName(), R.layout. activity_widget); r.setOnClickPendingIntent(R.I'd.pic, pic); The above code isn't working for the time i.e., when I start the widget for the first time then widget gets loaded easily but when I go

Resetting checkboxes in Android's Alert Dialog

爱⌒轻易说出口 提交于 2019-12-08 09:51:04
问题 I am using AlertDialog with setMultiChoiceItems to let the user select multiple items which is working fine. The problem is, next time the AlertDialog appears, it still has the items checked. I tried unchecking them by overriding onPrepareDialog but it is not working. This is my code: @Override protected Dialog onCreateDialog( int id ) { String[] PROJECTION=new String[] { Contacts._ID, Contacts.DISPLAY_NAME, Phone.NUMBER}; String number = null; String[] ARGS={String.valueOf(Phone.TYPE_MOBILE)

how to get the value of dialer in android-application?

落爺英雄遲暮 提交于 2019-12-08 09:36:38
问题 i am developing one application which is based on SIP. And i want to store the value of dialer(value of buttons which is pressed to call) i.e if i am dialing 12345 then how do i store this value in particular string or integer for further manipulation and concatenation. Clicking on that Five(5) button, phones default dialpad will open.i want to do this in my application. 回答1: Having in mind the following scenario: You have a dialpad (buttons from 0-9 etc) and an EditText, which gets updated

Getting Android SDK WebView and TabWidget to play nice

时光怂恿深爱的人放手 提交于 2019-12-08 09:23:17
问题 I’m taking the HelloTabWidget Android example and trying two things: Moving the tabs to the bottom vs. the top (if that’s even desirable from an Android UI POV) Making each tab show a particular WebView in the space above I’ve got this for a layout (high level): <TabHost> <LinearLayout> <FrameLayout> <WebView/> <WebView/> <WebView/> <WebView/> <WebView/> </FrameLayout> <TabWidget/> </LinearLayout> </TabHost> Everything has a width/height set to fill_parent except for the TabWidget which has